checkpoint_timeout
Fact — official short description: “Sets the maximum time between automatic WAL checkpoints.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 300 |
s |
5 min |
How it works
An automatic checkpoint is considered after checkpoint_timeout, but max_wal_size can force one earlier. If no WAL has been written since the preceding checkpoint, PostgreSQL can skip the timed checkpoint, so this setting is a maximum scheduling interval rather than a promise of periodic physical work.
Longer intervals usually reduce checkpoint frequency and full-page-write amplification, while increasing the amount of WAL that crash recovery may need to replay. Shorter intervals bound that replay horizon more tightly but increase dirty-page flushing and post-checkpoint full-page images.
Checkpoint records also constrain restartpoints on standbys. This parameter should not be used to set a WAL-archive recovery point objective; archive_timeout is the control intended to force segment switches for low-WAL systems.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Tune it together with max_wal_size and keep checkpoint I/O spread with checkpoint_completion_target. Extend the interval only after measuring recovery requirements, requested versus timed checkpoints, write latency, and WAL volume. |
| OLAP | During bulk work, max_wal_size often triggers before the timer. Increase WAL capacity first if volume-driven checkpoints dominate, and retain a timeout that still meets restart and recovery expectations. |
| Small nodes | The upstream 5-minute default is a defensible starting point where recovery time matters and storage is limited. A longer interval needs explicit disk headroom and a tested crash-recovery budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 15min |
different | 15min |
| OLAP | 15min |
different | 15min |
| CRIT | 15min |
different | 15min |
| TINY | 15min |
different | 15min |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 15min (dcs); OLAP: PG9.0–19 Beta 3 = 15min (dcs); CRIT: PG9.0–19 Beta 3 = 15min (dcs); TINY: PG9.0–19 Beta 3 = 15min (dcs). Advice, pending human review — confirm the operational intent against the current Pigsty templates and supported PostgreSQL versions before publication.
Common pitfalls
- Assuming a checkpoint occurs exactly every configured interval even on an idle system.
- Forgetting that max_wal_size can trigger a checkpoint earlier.
- Using checkpoint_timeout instead of archive_timeout to bound archive delay.
- Increasing it without allowing for a longer crash-recovery replay horizon.
- Reducing it so far that full-page writes and checkpoint I/O dominate.
Related parameters
max_wal_size · checkpoint_completion_target · checkpoint_warning · archive_timeout · full_page_writes · checkpoint_flush_after
References
- PostgreSQL 19 Beta 3 — checkpoint_timeout
- PostgreSQL 18: WAL Configuration
- PostgreSQL 19 release notes
- Machine-readable GUC export