Transaction Log
A sequential record of all changes to the database, used for crash recovery and replication.
The transaction log, also called Write-Ahead Log (WAL), is one of the most important data structures in any modern DBMS. The core rule: before any data page is written to disk, its log entries must be written first. If the system crashes, the recovery process replays or reverses log entries to restore the database to a consistent state.
The log typically lives on fast sequential I/O (often a dedicated disk), while data pages suffer random I/O on slower storage. This separation, enabled by undo-redo recovery, became fundamental to OLTP databases. The same log later served replication: a standby server could read the primary's log and apply identical changes, becoming the foundation of all modern streaming replication. The log is simultaneously the database's recovery guarantee and its replication backbone.