WAL & checkpointsReload, no restartdefault 80 MB

min_wal_size

Sets the minimum size to shrink the WAL to.

How you change it

Reload, no restart

Defaults and ranges on this page were read from pg_settings on live PostgreSQL 18.4. Treat older majors as needing their own check before you copy a value.

What this means

The floor below which PostgreSQL stops recycling old WAL segments for reuse and starts removing them. Keeping more WAL preallocated avoids the cost of creating new segments during bursts of write activity.

When it matters

Raise on spiky write workloads so segment recycling keeps up with bursts.

Default80 MB
Range2 – 2147483647
Typeinteger
Change scopeReload, no restart
CategoryWAL & checkpoints
Check the current value
SHOW min_wal_size;

Tradeoffs

  • Too low: PostgreSQL recreates WAL segments during write spikes instead of recycling them.
  • Higher values keep more preallocated WAL on disk.
  • Works in tandem with max_wal_size to bound WAL disk usage.
PostgreSQL manual: min_wal_size

← All GUCs · Glossary · Runbooks