Why it matters
WAL configuration affects durability, performance, and recoverability. Getting it right is core DB ops.
Advertisement
The architecture
Append-only file. Every mutation (insert, update, delete) generates WAL records before data pages are modified.
Sync policy: fsync per commit (durable), periodic (fast, some loss possible), off (fast, unsafe).
Advertisement
How it works end to end
Checkpoint: periodically write dirty pages to data files. After checkpoint, WAL up to that point can be discarded.
PITR: apply WAL from base backup to target time.
Replication: stream WAL to replicas.