Definition
Write Ahead Logging (ACID)
The central principle of write ahead logging is that any change to data must be recorded in a log before the change is written to its permanent location in the database. This log serves as a single source of truth for recovery in the event of a system crash.
- Before a transaction enters the commit state, “all its” log entries have to be written to stable storage, incl. the commit log entry.
- Before a modified page (or block) in main memory can be written to the database (non-volatile storage), “all its” log entries have to be written to stable storage.