{"Entry":{"collection":"guc","key":"checkpoint_timeout","name":"checkpoint_timeout","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Write-Ahead Log / Checkpoints","category_zh":"","changed_in":["9.6"],"changes":[{"documentation_changed":true,"fields":{},"from":"8.1","status":"changed","to":"8.2"},{"documentation_changed":true,"fields":{},"from":"8.2","status":"changed","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"9.4","status":"changed","to":"9.5"},{"documentation_changed":true,"fields":{"max_val":{"from":"3600","to":"86400"}},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"}],"content_hash":"ce27ad19804023c745f7be16aafc7c83ae116d42ce6e1448c76e0a5d9ce81d6e","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"5 min"}],"editorial":{"advice":{"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.","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.","small":"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."},"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."],"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."],"references":[{"title":"PostgreSQL 19 Beta 4: checkpoint_timeout","url":"https://www.postgresql.org/docs/19/runtime-config-wal.html#GUC-CHECKPOINT-TIMEOUT"},{"title":"PostgreSQL 18: WAL Configuration","url":"https://www.postgresql.org/docs/18/wal-configuration.html"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["max_wal_size","checkpoint_completion_target","checkpoint_warning","archive_timeout","full_page_writes","checkpoint_flush_after"],"summary":"checkpoint_timeout — Sets the maximum time between automatic WAL checkpoints. Observed in PG9.0–19 Beta 4; its last measured boot default is 5 min in PG19 Beta 4, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"7.4","group":"Write-Ahead Log","group_slug":"wal","imported_at":"2026-09-27T17:57:30.932708+08:00","intro_commit":{},"key":"checkpoint_timeout","last_version":"20","max_val":"","min_val":"","name":"checkpoint_timeout","position":58,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Maximum time between automatic WAL checkpoints.","short_desc_zh":"","source_rev":"english-manuals:ad4b63db7b87ddad7f541f3fb973825e6e91ab446555c11b61baddb5fc76e533","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"checkpoint_timeout","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"checkpoint_timeout","SourceRevision":"english-manuals:ad4b63db7b87ddad7f541f3fb973825e6e91ab446555c11b61baddb5fc76e533","Facts":{"boot_val":"300","category":"Write-Ahead Log / Checkpoints","context":"sighup","description":"Maximum time between automatic WAL checkpoints. If this value is specified without units, it is taken as seconds. The valid range is between 30 seconds and one day. The default is five minutes (5min). Increasing this parameter can increase the amount of time needed for crash recovery. This parameter can only be set in the postgresql.conf file or on the server command line.","doc":{"anchor":"GUC-CHECKPOINT-TIMEOUT","file":"runtime-config-wal.html","lang":"en","sha256":"d2646404a06e8f7ac655204b4f28c049ae8f3fd4f2272db080fcefa2c4af0763","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"86400","metadata_version":"18","min_val":"30","name":"checkpoint_timeout","short_desc":"Sets the maximum time between automatic WAL checkpoints.","source":"pg-settings-source-snapshot","unit":"s","vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-CHECKPOINT-TIMEOUT","file":"runtime-config-wal.html","lang":"en","sha256":"d2646404a06e8f7ac655204b4f28c049ae8f3fd4f2272db080fcefa2c4af0763","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"checkpoint_timeout","SourceDatabase":"center","Version":"18","Locale":"en","Title":"checkpoint_timeout","Summary":"Maximum time between automatic WAL checkpoints. If this value is specified without units, it is taken as seconds. The valid range is between 30 seconds and one day. The default is five minutes (5min). Increasing this parameter can increase the amount of time needed for crash recovery. This parameter can only be set in the postgresql.conf file or on the server command line.","BodyHTML":"\u003cp\u003eMaximum time between automatic WAL checkpoints. If this value is specified without units, it is taken as seconds. The valid range is between 30 seconds and one day. The default is five minutes (5min). Increasing this parameter can increase the amount of time needed for crash recovery. This parameter can only be set in the postgresql.conf file or on the server command line.\u003c/p\u003e","SourceRevision":"english-manuals:ad4b63db7b87ddad7f541f3fb973825e6e91ab446555c11b61baddb5fc76e533","ContentHash":"35411d130acf14657f675ca261b3e0472aa05bb2387749c541ddfb37227adc52","Payload":{"description":"Maximum time between automatic WAL checkpoints. If this value is specified without units, it is taken as seconds. The valid range is between 30 seconds and one day. The default is five minutes (5min). Increasing this parameter can increase the amount of time needed for crash recovery. This parameter can only be set in the postgresql.conf file or on the server command line."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
