WAL & checkpointsReload, no restartdefault 0.9

checkpoint_completion_target

Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.

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 fraction of the checkpoint interval over which PostgreSQL spreads the checkpoint's dirty-page writes. A value near 0.9 smooths the I/O so the write burst does not all land at once, reducing latency spikes for foreground queries.

When it matters

Modern defaults are already near 0.9; keep it high to smooth checkpoint I/O.

Default0.9
Range0 – 1
Typereal
Change scopeReload, no restart
CategoryWAL & checkpoints
Check the current value
SHOW checkpoint_completion_target;

Tradeoffs

  • Too low: checkpoint writes bunch up and cause periodic latency spikes.
  • Near 0.9 spreads the work but means a checkpoint is 'in progress' most of the time.
  • Only meaningful alongside a sensibly sized checkpoint_timeout / max_wal_size.
PostgreSQL manual: checkpoint_completion_target

← All GUCs · Glossary · Runbooks