{"Entry":{"collection":"guc","key":"vacuum_cost_limit","name":"vacuum_cost_limit","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":true,"fields":{},"from":"16","status":"changed","to":"17"},{"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":"136ad0c8a479ca6d3360140fe6480d6c27082072bd58f6956a3dba902c0f565b","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"200"}],"derived_content_hash":"6e67098422c4cb984da71942331145a5bac918cc0c6a4047581c0160a99c4111","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:292446239a752ab6fcde1b999c35891b5391c99aa0b65a48c59de4ae620f7c36","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"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_limit 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 amount available before napping. 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_limit together with vacuum_cost_delay, vacuum_cost_page_hit, vacuum_cost_page_miss. 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_limit","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-VACUUM-COST-LIMIT"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["vacuum_cost_delay","vacuum_cost_page_hit","vacuum_cost_page_miss","vacuum_cost_page_dirty","autovacuum_vacuum_cost_delay","autovacuum_vacuum_cost_limit"],"summary":"vacuum_cost_limit — Vacuum cost amount available before napping. Observed in PG9.0–19 Beta 4; its last measured boot default is 200 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.270295+08:00","intro_commit":{},"key":"vacuum_cost_limit","last_version":"20","max_val":"","min_val":"","name":"vacuum_cost_limit","position":447,"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"],"repair_provenance":{"original_source_revision":"english-manuals:dca6706b11c7a12537834d3d457bbabded3f9c146b1db0c87c40951f0d140d09","receipt_sha256":"ae8e41913396e2c6c87b00bb1003d76eabebb1d8489088feac2ff50e979defff","repair":"wiki-repair-20261023"},"short_desc":"This is the accumulated cost that will cause the vacuuming process to sleep for vacuum_cost_delay.","short_desc_zh":"","source_rev":"wiki-repair-20261023:292446239a752ab6fcde1b999c35891b5391c99aa0b65a48c59de4ae620f7c36","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"vacuum_cost_limit","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"vacuum_cost_limit","SourceRevision":"wiki-repair-20261023:292446239a752ab6fcde1b999c35891b5391c99aa0b65a48c59de4ae620f7c36","Facts":{"boot_val":"200","category":"Vacuuming / Cost-Based Vacuum Delay","context":"user","description":"This is the accumulated cost that will cause the vacuuming process to sleep for vacuum_cost_delay. The default is 200.","description_zh":"会使清理进程休眠 vacuum_cost_delay 指定时长的累计代价。默认值为 200。","description_zh_html":"\u003cp\u003e\n        会使清理进程休眠 \u003ccode class=\"varname\"\u003evacuum_cost_delay\u003c/code\u003e 指定时长的累计代价。默认值为 \u003ccode class=\"literal\"\u003e200\u003c/code\u003e。\n       \u003c/p\u003e","doc":{"anchor":"GUC-VACUUM-COST-LIMIT","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"},"doc_html":"\u003cp\u003e\n         This is the accumulated cost that will cause the vacuuming\n         process to sleep for \u003ccode class=\"varname\"\u003evacuum_cost_delay\u003c/code\u003e.  The\n         default is \u003ccode class=\"literal\"\u003e200\u003c/code\u003e.\n        \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-vacuum.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","version":"18.7"},{"file":"runtime-config-vacuum.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"b835e4b6c446cfdaf673750aba29ba28fc55ef6cc0c531558c1e394fdc05a140","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"10000","metadata_version":"18","min_val":"1","name":"vacuum_cost_limit","short_desc":"Vacuum cost amount available before napping.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-vacuum.html","sha256":"ea621aa6ed500fc56d21868a21fd313872cec24b86caf4c8f9bdfdc804b8235f"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"integer","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-VACUUM-COST-LIMIT","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"vacuum_cost_limit","SourceDatabase":"center","Version":"18","Locale":"en","Title":"vacuum_cost_limit","Summary":"This is the accumulated cost that will cause the vacuuming process to sleep for vacuum_cost_delay. The default is 200.","BodyHTML":"\u003cp\u003e\n         This is the accumulated cost that will cause the vacuuming\n         process to sleep for \u003ccode\u003evacuum_cost_delay\u003c/code\u003e.  The\n         default is \u003ccode\u003e200\u003c/code\u003e.\n        \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:292446239a752ab6fcde1b999c35891b5391c99aa0b65a48c59de4ae620f7c36","ContentHash":"aaada8c7b11dc35e41ca6de8c0ce6f177b048a230a6254b561574a1ad0e374ba","Payload":{"description":"This is the accumulated cost that will cause the vacuuming process to sleep for vacuum_cost_delay. The default is 200."}},"RequestedLocale":"en","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}
