An Acronym for Write-ahead log. This is the mechanism used by
PostgreSQL to guarantee durability in ACID compliant
transactions. Without it, it is not possible to guarantee
durability. The WAL is divided into segments. After some
configurable number of filled segments, a checkpoint is created.
These terms will be explained later. First, however, it is
important to understand what the WAL actually does. In order to
provide durability, the database must be able to correctly
recover all the changes made by commited transactions before a
crash. Further, previously committed data must not be corrupted.
The significant errors that can occur during a crash are: Using
fsync(2) on the modified data files does not provide the
required durability. During fsync(2), a partial write may still
result, corrupting previously committed data. This is very real
possibility under heavy I/O and an OS crash or power outage.
Furthermore, if many different data files were touched by a
transaction, all the data files need to be flushe