Database Kernel (6): WAL, Replay and Checkpoint
Transactions make concurrency correct, but machines crash. What recovers the system? An append-only log, plus a marker for where to start replaying. The final post in the plan series. 1. What’s in the WAL walog is a file storing redo log entries sequentially: Type Written when insert / delete / update a transaction writes flush a transaction commits checkpoint everything before it is already applied to tables create table / schema / use table DDL and table switching Key convention: entries between two flushes belong to one transaction, so replay needs no extra transaction-boundary metadata. ...