This simulation shows how a database writes sequential log records before applying changes to data pages, and how a simulated crash and recovery pass replays the log to restore a consistent state.
Trigger writes to append log entries, watch checkpoints apply them to the data files, then force a crash at any moment to see the redo/undo recovery process play out.
Use the controls to issue writes, run or skip checkpoints, and trigger a crash to observe how log replay recovers the database.
PostgreSQL's WAL and MySQL's InnoDB redo log both use this exact pattern, and the same idea powers journaling filesystems like ext4 and NTFS that protect your files from corruption during power loss.
This simulation shows how a database writes sequential log records before applying changes to data pages, and how a simulated crash and recovery pass replays the log to restore a consistent state.
This simulation shows how a database writes sequential log records before applying changes to data pages, and how a simulated crash and recovery pass replays the log to restore a consistent state.
Trigger writes to append log entries, watch checkpoints apply them to the data files, then force a crash at any moment to see the redo/undo recovery process play out.
PostgreSQL's WAL and MySQL's InnoDB redo log both use this exact pattern, and the same idea powers journaling filesystems like ext4 and NTFS that protect your files from corruption during power loss.