{"Entry":{"collection":"guc","key":"autovacuum_vacuum_cost_delay","name":"autovacuum_vacuum_cost_delay","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Vacuuming / Automatic Vacuuming","category_zh":"","changed_in":["12","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":true,"fields":{"boot_val":{"from":"20","to":"2"},"vartype":{"from":"integer","to":"real"}},"from":"11","status":"changed","to":"12"},{"documentation_changed":false,"fields":{"category":{"from":"Autovacuum","to":"Vacuuming / Automatic Vacuuming"},"extra_desc":{"from":null,"to":"-1 means use \"vacuum_cost_delay\"."}},"from":"17","status":"changed","to":"18"}],"content_hash":"7a39e115fac21df6359876748c9f5604046efccb519005b854848a44fdc892da","context":"","default_changed_in":["12"],"default_history":[{"from":"9.0","to":"11","value":"20 ms"},{"from":"12","to":"19","value":"2 ms"}],"derived_content_hash":"3c45b076021169b015f07ff1810f78a69ff7d76e8277f1721ccf30c5d7982f44","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:de6709603069da9de41e19572ea9be4371eb25d65d1da5ac36d70eba0bd63df0","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 autovacuum_vacuum_cost_delay 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 delay in milliseconds, 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_delay 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_delay","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-COST-DELAY"},{"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_limit"],"summary":"autovacuum_vacuum_cost_delay — Vacuum cost delay in milliseconds, for autovacuum. Observed in PG9.0–19 Beta 4; its last measured boot default is 2 ms 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.817512+08:00","intro_commit":{},"key":"autovacuum_vacuum_cost_delay","last_version":"20","max_val":"","min_val":"","name":"autovacuum_vacuum_cost_delay","position":27,"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"],"repair_provenance":{"original_source_revision":"english-manuals:c3152f0b09e94add6e64e314584179d2f2672b5545fc23a86e51437752f63c91","receipt_sha256":"ea4ad68b1a9874c47f44808fd1e64b5b6aac785214847bcf6477d2286119b937","repair":"wiki-repair-20261023"},"short_desc":"Specifies the cost delay value that will be used in automatic VACUUM operations.","short_desc_zh":"","source_rev":"wiki-repair-20261023:de6709603069da9de41e19572ea9be4371eb25d65d1da5ac36d70eba0bd63df0","unit":"","vartype":"real"}},"Definition":{"Collection":"guc","Key":"autovacuum_vacuum_cost_delay","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_vacuum_cost_delay","SourceRevision":"wiki-repair-20261023:de6709603069da9de41e19572ea9be4371eb25d65d1da5ac36d70eba0bd63df0","Facts":{"boot_val":"2","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_delay value will be used. If this value is specified without units, it is taken as milliseconds. The default value is 2 milliseconds. 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.","description_zh":"指定用于自动 VACUUM 操作中的代价延迟值。如果指定-1，则使用 vacuum_cost_delay 值。如果指定值时没有单位，则以毫秒为单位。默认值为 2 毫秒。该参数只能在 postgresql.conf 文件或在服务器命令行上设置。但是对个别表可以通过修改表存储参数来覆盖该设置。","description_zh_html":"\u003cp\u003e\n        指定用于自动 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 操作中的代价延迟值。如果指定-1，则使用 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-vacuum.html#GUC-VACUUM-COST-DELAY\"\u003evacuum_cost_delay\u003c/a\u003e 值。如果指定值时没有单位，则以毫秒为单位。默认值为 2 毫秒。该参数只能在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 文件或在服务器命令行上设置。但是对个别表可以通过修改表存储参数来覆盖该设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-COST-DELAY","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"},"doc_html":"\u003cp\u003e\n         Specifies the cost delay value that will be used in automatic\n         \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e operations.  If -1 is specified, the regular\n         \u003ca class=\"xref\" href=\"/docs/18/runtime-config-vacuum.html#GUC-VACUUM-COST-DELAY\"\u003evacuum_cost_delay\u003c/a\u003e value will be used.\n         If this value is specified without units, it is taken as milliseconds.\n         The default value is 2 milliseconds.\n         This parameter can only be set in the \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e\n         file or on the server command line;\n         but the setting can be overridden for individual tables by\n         changing table storage parameters.\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":"-1 means use \"vacuum_cost_delay\".","lang":"en","max_val":"100","metadata_version":"18","min_val":"-1","name":"autovacuum_vacuum_cost_delay","short_desc":"Vacuum cost delay in milliseconds, for autovacuum.","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":"ms","vartype":"real","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-COST-DELAY","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_vacuum_cost_delay","SourceDatabase":"center","Version":"18","Locale":"en","Title":"autovacuum_vacuum_cost_delay","Summary":"Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_delay value will be used. If this value is specified without units, it is taken as milliseconds. The default value is 2 milliseconds. 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.","BodyHTML":"\u003cp\u003e\n         Specifies the cost delay value that will be used in automatic\n         \u003ccode\u003eVACUUM\u003c/code\u003e operations.  If -1 is specified, the regular\n         \u003ca href=\"/docs/18/runtime-config-vacuum.html#GUC-VACUUM-COST-DELAY\" rel=\"nofollow\"\u003evacuum_cost_delay\u003c/a\u003e value will be used.\n         If this value is specified without units, it is taken as milliseconds.\n         The default value is 2 milliseconds.\n         This parameter can only be set in the \u003ccode\u003epostgresql.conf\u003c/code\u003e\n         file or on the server command line;\n         but the setting can be overridden for individual tables by\n         changing table storage parameters.\n        \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:de6709603069da9de41e19572ea9be4371eb25d65d1da5ac36d70eba0bd63df0","ContentHash":"684413d5796ff33dcb43f1a877f6e84660c47eeb184d79215ab84fcdc683298a","Payload":{"description":"Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified, the regular vacuum_cost_delay value will be used. If this value is specified without units, it is taken as milliseconds. The default value is 2 milliseconds. 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."}},"RequestedLocale":"en","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}
