# checkpoint_timeout

> checkpoint_timeout — Sets the maximum time between automatic WAL checkpoints. Observed in PG9.0–19 Beta 3; its last measured boot default is 5 min in PG19 Beta 3, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Sets the maximum time between automatic WAL checkpoints.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `sighup` | Takes effect after configuration reload |
| Unit | `s` | Raw unit |
| Range | `30` – `86400` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Write-Ahead Log / Checkpoints | Upstream classification |
| Latest boot value | `300` | 5 min |
{.fields meta="-"}

## Lifecycle {#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 {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG9.0–19 Beta 3 | `300` | `s` | 5 min |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

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 {#tuning-advice}

> [!TIP]
> **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. |
{.full-width}

## Pigsty {#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` |
{.full-width}

> [!CAUTION]
> **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 {#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 {#related-parameters}

[`max_wal_size`](/parameters/max-wal-size/) · [`checkpoint_completion_target`](/parameters/checkpoint-completion-target/) · [`checkpoint_warning`](/parameters/checkpoint-warning/) · [`archive_timeout`](/parameters/archive-timeout/) · [`full_page_writes`](/parameters/full-page-writes/) · [`checkpoint_flush_after`](/parameters/checkpoint-flush-after/)

## References {#references}

- [PostgreSQL 19 Beta 3 — checkpoint_timeout](https://www.postgresql.org/docs/19/runtime-config-wal.html#GUC-CHECKPOINT-TIMEOUT)
- [PostgreSQL 18: WAL Configuration](https://www.postgresql.org/docs/18/wal-configuration.html)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
