Logging Undo’s
Log the undo(U) operation, and use its LSN on P
- CLR = Compensation Log Record = a logged undo
- Do this for all undo’s (during normal abort or recovery)
This preserves the invariant that the LSN on each page P exactly describes P’s state relative to the log.
- P contains all updates to P up to and including the LSN on P, and no updates with larger LSN.
So every aborted transaction’s log is a palindrome of update records and undo records.
Restart processes Commit and Abort the same way
- It redoes the transaction’s log records.
- It only aborts active transactions after the forward scan