Redo, Undo, and Restartable Recovery

Explain why a database may replay changes and then reverse unfinished operations, and record reversal progress for another restart.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Reconstruct what the logged history says happened
  2. Undo work can itself require a durable trail

Reconstruct what the logged history says happened

A no-force engine can commit changes while their pages remain only in memory. Redo restores missing effects described in durable records. An engine allowing dirty writes from uncommitted work may also find parts of an incomplete transaction on disk. In ARIES-style recovery, redo repeats needed history, then undo reverses unfinished transactions. Page markers help distinguish missing changes from those already applied.

Undo work can itself require a durable trail

A compensation record describes a reversal and how to continue undo if another failure occurs. On restart, the recovery process can redo that compensation where needed and avoid undoing the same original change again. Transaction completion and page propagation remain distinct. Write-ahead logging defines the protected ordering. Checkpoints reduce how much earlier state must be reconstructed from records.[1]

References

  1. C. Mohan et al., ARIES: A Transaction Recovery Method ↩