Recovery uses the log prefix available at the crash point.

highlighted = computed this step

Crash and recovery

Recovery starts from the log that exists at the crash point. Records after the crash are not available to the compiler. Note: the red crash line marks the cutoff.

crash cutoff\text{crash cutoff}

Crash point

The truncated log has 5 records. Note: recovery classifies transactions using only those records.

records before crash=5\text{records before crash}=5

a simplified redo/undo recovery over a tiny log; ARIES detail (fuzzy checkpoints, CLRs, media recovery) and real durability/fsync are beyond these traces - no product claims.

Crash point lsn txn type item before->after 1 T1 begin 2 T1 write A 0->5 3 T1 commit 4 T2 begin 5 T2 write B 0->9 CRASH winners: T1 losers: T2 recovered state item value A 5 B 0 redo LSNs: 2 undo LSNs: 5

Recovered table

The recovered state has 2 items. Note: the item values fall out of recovery, not author text.

recovered items=2\text{recovered items}=2

a simplified redo/undo recovery over a tiny log; ARIES detail (fuzzy checkpoints, CLRs, media recovery) and real durability/fsync are beyond these traces - no product claims.

Crash point lsn txn type item before->after 1 T1 begin 2 T1 write A 0->5 3 T1 commit 4 T2 begin 5 T2 write B 0->9 CRASH winners: T1 losers: T2 recovered state item value A 5 B 0 redo LSNs: 2 undo LSNs: 5

Summary

Crash recovery is deterministic replay over the available log prefix. Note: this is simplified redo and undo; ARIES detail, fuzzy checkpoints, CLRs, media recovery, and real fsync durability are deferred.

available prefix\text{available prefix}