A write-ahead log (WAL) is a technique in which a database or storage system records each change to an append-only log file before modifying the data itself. Because the actual data structures are updated only after the log entry is durable, the system can replay the log after a crash to recover or roll back changes. It is the standard method for guaranteeing the atomicity and durability of transactions.
Most databases, including PostgreSQL, SQLite, and MySQL's InnoDB, use it, and because it involves only sequential writes it is faster than random writes. In distributed systems a single log shared by many nodes is also used to establish the order of writes, in which case appending to the end of the log becomes the serialization point.