Module 6 · Logging and recovery
Episode 42 Checkpoints and ARIES
▶ This video is coming to YouTube soon.
What does a database do in the second after a crash? This episode takes a fuzzy checkpoint, crashes the system, and plays ARIES's analysis, redo and undo passes record by record, including a second crash in the middle of undo. Then it kills a real Postgres and proves its recovery is redo only: the uncommitted row version is still on the page, invisible.
Chapters
- 0:00Intro
- 0:15kill -9, then a fraction of a second
- 0:41Fuzzy checkpoints: nobody waits
- 2:03ARIES in three ideas
- 2:25Pass 1, analysis: rebuild the tables
- 3:13Pass 2, redo: repeat history
- 4:12Pass 3, undo: newest first, with CLRs
- 4:56A crash during undo
- 5:46The code: redo's test and the undo loop
- 6:21Postgres: redo, and no undo at all
- 7:15Proof: a Postgres checkpoint
- 7:38Proof: one commit, one not, then kill -9
- 8:08Proof: Postgres's recovery is redo only
- 8:51ARIES vs. Postgres
- 9:27Recap
- 9:52Next: Lab: Pull the Plug