WAL & checkpointsReload, no restartdefault 1 GB
max_wal_size
Sets the WAL size that triggers a checkpoint.
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
A soft target for how large WAL can grow between automatic checkpoints. Raising it spaces checkpoints further apart, which reduces full-page-write overhead and smooths write I/O, at the cost of longer crash recovery and more disk used by WAL.
When it matters
Increase substantially on write-heavy systems to avoid frequent, disruptive checkpoints.
| Default | 1 GB |
|---|---|
| Range | 2 – 2147483647 |
| Type | integer |
| Change scope | Reload, no restart |
| Category | WAL & checkpoints |
Check the current value
SHOW max_wal_size;Tradeoffs
- • Too low: checkpoints fire often, causing repeated full-page-write bursts.
- • Too high: crash recovery takes longer and WAL consumes more disk.
- • Tune together with checkpoint_timeout and checkpoint_completion_target.
Workload profiles
Write-heavy OLTP
Raise well above the default so checkpoints are driven by time, not volume.
Watch the 'checkpoints too frequent' log warning.