{"Entry":{"collection":"guc","key":"autovacuum_vacuum_cost_limit","name":"autovacuum_vacuum_cost_limit","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Vacuuming / Automatic Vacuuming","category_zh":"","changed_in":["18"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.0","status":"added","to":"8.1"},{"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":"8.3","status":"changed","to":"8.4"},{"documentation_changed":true,"fields":{},"from":"9.4","status":"changed","to":"9.5"},{"documentation_changed":false,"fields":{"category":{"from":"Autovacuum","to":"Vacuuming / Automatic Vacuuming"},"extra_desc":{"from":null,"to":"-1 means use \"vacuum_cost_limit\"."}},"from":"17","status":"changed","to":"18"}],"content_hash":"f28bf67fbd2d59ad951b7b88d69f7404aa9975ea583fd31f3be1083a21355cd6","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"-1"}],"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 autovacuum_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, for autovacuum. A configuration reload applies a new value; existing work already in flight is not retroactively changed.","These values govern cost throttling for autovacuum workers; -1 inherits vacuum_cost_delay or vacuum_cost_limit respectively. With multiple active workers, the autovacuum cost budget is balanced among them, so a per-worker reading is not simply multiplied by concurrency.","Monitor and change autovacuum_vacuum_cost_limit together with vacuum_cost_delay, vacuum_cost_limit, vacuum_cost_page_hit. Validate on the relevant server role and real workload, then use its sighup 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: autovacuum_vacuum_cost_limit","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-COST-LIMIT"},{"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","vacuum_cost_page_dirty","autovacuum_vacuum_cost_delay"],"summary":"autovacuum_vacuum_cost_limit — Vacuum cost amount available before napping, for autovacuum. Observed in PG9.0–19 Beta 4; its last measured boot default is -1 in PG19 Beta 4, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"8.1","group":"Vacuuming","group_slug":"vacuum","imported_at":"2026-09-27T17:57:30.823492+08:00","intro_commit":{},"key":"autovacuum_vacuum_cost_limit","last_version":"20","max_val":"","min_val":"","name":"autovacuum_vacuum_cost_limit","position":28,"present_in":["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":"Specifies the cost limit value that will be used in automatic VACUUM operations.","short_desc_zh":"","source_rev":"english-manuals:7bebbb58b8b8229d757c26e0cf959015e73c9a081f5be431cc32937d24ea38eb","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"autovacuum_vacuum_cost_limit","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_vacuum_cost_limit","SourceRevision":"english-manuals:7bebbb58b8b8229d757c26e0cf959015e73c9a081f5be431cc32937d24ea38eb","Facts":{"boot_val":"-1","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used. Note that the value is distributed proportionally among the running autovacuum workers, if there is more than one, so that the sum of the limits for each worker does not exceed the value of this variable. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters.","doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-COST-LIMIT","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"-1 means use \"vacuum_cost_limit\".","lang":"en","max_val":"10000","metadata_version":"18","min_val":"-1","name":"autovacuum_vacuum_cost_limit","short_desc":"Vacuum cost amount available before napping, for autovacuum.","source":"pg-settings-source-snapshot","unit":null,"vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-COST-LIMIT","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_vacuum_cost_limit","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"autovacuum_vacuum_cost_limit","Summary":"","BodyHTML":"\u003cp\u003e指定用于自动\u003ccode\u003eVACUUM\u003c/code\u003e操作中的代价限制值。如果指定\u003ccode\u003e-1\u003c/code\u003e（默认值），则使用\u003ca href=\"/docs/18/runtime-config-vacuum.html#GUC-VACUUM-COST-LIMIT\" rel=\"nofollow\"\u003evacuum_cost_limit\u003c/a\u003e值。注意该值被按比例地分配到运行中的自动清理工作进程上（如果有多个），因此每一个工作进程的限制值之和不会超过这个变量中的值。该参数只能在\u003ccode\u003epostgresql.conf\u003c/code\u003e文件或在服务器命令行上设置。但是对个别表可以通过修改表存储参数来覆盖该设置。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"50e5367258b5471722a8310322d5f026ab2e3125b5cde1c38ef8e353ac031abc","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定用于自动\u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e操作中的代价限制值。如果指定\u003ccode class=\"literal\"\u003e-1\u003c/code\u003e（默认值），则使用\u003ca href=\"/docs/18/runtime-config-vacuum.html#GUC-VACUUM-COST-LIMIT\"\u003evacuum_cost_limit\u003c/a\u003e值。注意该值被按比例地分配到运行中的自动清理工作进程上（如果有多个），因此每一个工作进程的限制值之和不会超过这个变量中的值。该参数只能在\u003ccode class=\"filename\"\u003epostgresql.conf\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.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}
