{"Entry":{"collection":"guc","key":"vacuum_cost_page_dirty","name":"vacuum_cost_page_dirty","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Vacuuming / Cost-Based Vacuum Delay","category_zh":"","changed_in":["18"],"changes":[{"documentation_changed":false,"fields":{},"from":"7.4","status":"added","to":"8.0"},{"documentation_changed":false,"fields":{"category":{"from":"Resource Usage / Cost-Based Vacuum Delay","to":"Vacuuming / Cost-Based Vacuum Delay"}},"from":"17","status":"changed","to":"18"}],"content_hash":"7089c0950838cf011494cd9dca23e991b4eaac931574c2a341c44a2921d3d23e","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"20"}],"editorial":{"advice":{"olap":"During post-load windows, a larger budget or shorter delay can improve maintenance throughput, but verify that scans do not starve queries/imports. Failsafe activation means normal pacing already failed.","oltp":"Tune vacuum_cost_page_dirty from autovacuum duration, dead-tuple growth, and foreground I/O latency together. Prefer per-table overrides for hotspots; global throttling must not let cleanup fall permanently behind.","small":"Keep conservative defaults. On slow disks, lowering concurrency or overriding one table is usually more controllable than making the delay arbitrarily large."},"mechanism":["Vacuum cost for a page dirtied by vacuum. It can be changed at session scope, so different sessions may observe different behavior.","VACUUM accumulates virtual cost for page hits, misses, and dirties; after the balance reaches vacuum_cost_limit it sleeps for vacuum_cost_delay and resets. This is coarse I/O pacing rather than an exact bandwidth cap, and the wraparound failsafe bypasses throttling.","Monitor and change vacuum_cost_page_dirty together with vacuum_cost_delay, vacuum_cost_limit, vacuum_cost_page_hit. Validate on the relevant server role and real workload, then use its user context to choose session change, reload, or restart; a historical boot default is not the current effective value."],"pitfalls":["Changing the global value while a table storage parameter overrides it.","Treating reltuples and cumulative change statistics as exact real-time counts.","Blaming a threshold without checking long transactions, replication slots, and worker saturation.","Buying short-term quiet by deferring maintenance until wraparound failsafe activates."],"references":[{"title":"PostgreSQL 19 Beta 4: vacuum_cost_page_dirty","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-VACUUM-COST-PAGE-DIRTY"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["vacuum_cost_delay","vacuum_cost_limit","vacuum_cost_page_hit","vacuum_cost_page_miss","autovacuum_vacuum_cost_delay","autovacuum_vacuum_cost_limit"],"summary":"vacuum_cost_page_dirty — Vacuum cost for a page dirtied by vacuum. Observed in PG9.0–19 Beta 4; its last measured boot default is 20 in PG19 Beta 4, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"8.0","group":"Vacuuming","group_slug":"vacuum","imported_at":"2026-09-27T17:57:32.273581+08:00","intro_commit":{},"key":"vacuum_cost_page_dirty","last_version":"20","max_val":"","min_val":"","name":"vacuum_cost_page_dirty","position":448,"present_in":["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":"The estimated cost charged when vacuum modifies a block that was previously clean.","short_desc_zh":"","source_rev":"english-manuals:0bb2f9d44fcc006cc0c3ec38104c48dfd699a75e79bf472f60d4f9fe0e8426cc","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"vacuum_cost_page_dirty","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"vacuum_cost_page_dirty","SourceRevision":"english-manuals:0bb2f9d44fcc006cc0c3ec38104c48dfd699a75e79bf472f60d4f9fe0e8426cc","Facts":{"boot_val":"20","category":"Vacuuming / Cost-Based Vacuum Delay","context":"user","description":"The estimated cost charged when vacuum modifies a block that was previously clean. It represents the extra I/O required to flush the dirty block out to disk again. The default value is 20.","doc":{"anchor":"GUC-VACUUM-COST-PAGE-DIRTY","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"10000","metadata_version":"18","min_val":"0","name":"vacuum_cost_page_dirty","short_desc":"Vacuum cost for a page dirtied by vacuum.","source":"pg-settings-source-snapshot","unit":null,"vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-VACUUM-COST-PAGE-DIRTY","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"vacuum_cost_page_dirty","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"vacuum_cost_page_dirty","Summary":"","BodyHTML":"\u003cp\u003e清理操作修改原本干净的数据块时所计入的估算代价。它表示再次将脏块刷盘所需的额外 I/O。默认值为 \u003ccode\u003e20\u003c/code\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"b7539f1ba0c3028ea534b661ca7bf73b03426194b747c2f4043bbcbbf4dc1988","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e清理操作修改原本干净的数据块时所计入的估算代价。它表示再次将脏块刷盘所需的额外 I/O。默认值为 \u003ccode class=\"literal\"\u003e20\u003c/code\u003e。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","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","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
