Write-Ahead Logging (WAL)
Write-ahead logging (WAL) is a family of techniques for providing atomicity and durability (two of the ACID properties) in database systems.
Allowing indices on stable store to be updated prior to a LOG can lead to inconsistency.
A write-ahead logging (WAL) protocol avoids this by following:
- an undo rule: a log record for an update is appended to the LOG file before the corresponding data page is written to stable store.
- guarantees atomicity
- a redo rule: all log records for a transaction are appended to the LOG file before acknowledging a commit.
- guarantees durability