Christophe Pettus: All Your GUCs in a Row: checkpoint_timeout and checkpoint_completion_target
The article discusses two key PostgreSQL parameters: checkpoint_timeout and checkpoint_completion_target. It explains how these parameters affect the performance and recovery of PostgreSQL databases. The author provides recommendations for tuning these settings based on different workload scenarios.
- ▪Checkpoint_timeout determines the maximum time between automatic checkpoints, with a default of 5 minutes.
- ▪Checkpoint_completion_target is a fraction of checkpoint_timeout that spreads the I/O load during checkpoints to prevent performance issues.
- ▪Adjusting these parameters can lead to less write amplification and smaller WAL volumes, but may also increase recovery time after a crash.
Opening excerpt (first ~120 words) tap to expand
2026-05-21 4 min PostgreSQL All Your GUCs in a Row: checkpoint_timeout and checkpoint_completion_target The C cluster opens with the first two checkpoint parameters. We take them out of alphabetical order because checkpoint_completion_target is defined as a fraction of checkpoint_timeout and is unintelligible without it. The alphabet can wait one post. A short tour of checkpoints A checkpoint is the moment when PostgreSQL guarantees that every dirty page in shared buffers has been written to disk and fsync()‘d, after which the WAL preceding the checkpoint is no longer needed for crash recovery. The checkpointer process performs them on a regular cadence governed by these parameters.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Postgr.