Re: why do you apply undo before redo?
Date: Tue, 20 Apr 2004 16:04:25 GMT
Message-ID: <dSbhc.86439$vn.250197_at_sea-read.news.verio.net>
"Laconic2" <laconic2_at_comcast.net> wrote in message
news:SLCdnaMuQaWu2hjdRVn-tw_at_comcast.com...
> What if you were "in the middle of committing" at the moment of the
crash.
>
A "commit" is consummated when a commit marker of some sort is physically
written to the disk (not just flushed from cache). Upon recovery, if the
commit marker cannot be found on disk, the transaction didn't occur. If it
is found, the recovery process is responsible for rolling any logged changes
into the physical database files. There is no middle ground.
> Couldn't either the redo log, or the database, or the two of them taken
> together be in an inconsistent state?
>
A good DBMS will not have any point at which the log and database are not
in a recoverable state.
> Wouldn't it be necessary to resolve that inconsistency, if possible, by
> rolling back transactions in progress, before applying the redo to the
> database?
>
>
Received on Tue Apr 20 2004 - 18:04:25 CEST