Glossary / WAL (Write-Ahead Logging)

WAL (Write-Ahead Logging)

Practical PostgreSQL glossary entry with a clear definition, example, and benchmarking context.

What Is WAL (Write-Ahead Logging)?

WAL ensures that all changes are logged before being written to the main database. It provides durability and enables crash recovery. WAL files can also be used for replication.

Why It Matters for PostgreSQL Performance

In PostgreSQL performance work, WAL (Write-Ahead Logging) affects throughput, latency, or operational reliability depending on workload and configuration.

Practical Benchmarking Context

When benchmarking with pgbench, track how WAL (Write-Ahead Logging) changes behavior across scale factor, client concurrency, and storage conditions.

Use this term together with workload shape, concurrency level, and scale factor when interpreting pgbench outputs. Isolated values can be misleading without full run context.

Example

Directory: Usually stored in $PGDATA/pg_wal/

Related Resources