Write-ahead log
Write-ahead logging (WAL) means: persist an append-only log of changes before (or as part of) considering transactions durable, then apply those changes to data files in a more batch-friendly way.
It gives crash recovery (replay from the log after failure) and is usually the backbone for replication (ship the same log to replicas) and sometimes for CDC (turn log records into change events).
The core tradeoff is throughput vs durability: flushing the log more often is safer but costs more I/O.
For PostgreSQL’s WAL, segments, and how it ties to replication, see Postgres WAL.