In computer science, write ahead logging (WAL) is a family of techniques for providing atomicity and durability (two of the ACID properties) in database systems. Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems. ... ... In database systems, durability is the ACID property that guarantees that transactions that are successfully committed will survive permanently and will not be undone by system failure. ... For other uses, see Acid (disambiguation). ... A database management system (DBMS) is a computer program (or more typically, a suite of them) designed to manage a database, a large set of structured data, and run operations on the data requested by numerous users. ...
In a system using WAL, all modifications are written to a log before they are applied to the database. Usually both redo and undo information is stored in the log. In in the field of databases in computer science, a database log is a history of actions executed by a database management system. ...
The motivation for WAL is to allow updates of the database to be done in-place. The other obvious way to implement atomic update is with shadow paging, which is not in-place. The main advantage of doing updates in-place is it reduces the need to modify indexes and block lists. In computer science, an in-place algorithm is an algorithm which transforms a data structure using a small, constant amount of extra storage space. ... In computer science, shadow paging is a technique for providing atomicity and durability (two of the ACID properties) in database systems. ...
ARIES is a popular algorithm in the WAL family. In computer science, Algorithms for Recovery and Isolation Exploiting Semantics, or ARIES is a recovery algorithm designed to work with a no-force, steal database approach. ...
The information that is recorded in the log records is such that one can combine the data in the log record with the data in the old version of a database block to produce a new, updated version of the block.
The purpose of the after-image log is to provide a mechanism for recovering from a failure that destroys all or part of the databases data files or all or part of the before-image log.
This means that when the database manager writes a log buffer to disk (using a write() system call or something similar), the data must actually be written to the disk and not just saved in memory by the operating system or a disk controller.