WriteAheadLogging
Write-Ahead Logging (WAL) is a technique used in databases and some file systems to ensure durability and atomicity of writes. In WAL, all modifications are first recorded in a log before they are applied to the actual data files. The log is written sequentially and durably, and only then are the data pages updated. This arrangement allows the system to recover to a consistent state after a crash by replaying the log to redo committed transactions and to undo any uncommitted work.
Operations are described by log records that capture the intent and details of changes. The log is
WAL is a core component in many database systems, including PostgreSQL, and is also used in SQLite’s
Trade-offs include increased write-ahead latency due to the need to persist log records before data pages are