Satisfying the Undo Rule
To implement the Write-Ahead Log Protocol, tag each cache slot with the log sequence number (LSN) of the last update record to that slot’s page.
- Cache manager won’t flush a page P until P’s last updated record, pointed to by LSN, is on disk.
- P’s last log record is usually stable before Flush(P), so this rarely costs an extra flush
- LSN must be updated while latch is held on P’s slot