{"Entry":{"collection":"guc","key":"autovacuum_vacuum_threshold","name":"autovacuum_vacuum_threshold","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"}},"from":"17","status":"changed","to":"18"}],"content_hash":"ff737200cbf48f27566e11bb3d51128be1a5caed78e81da79e0290a50bd03a3f","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"50"}],"derived_content_hash":"a463a95e4bdf0002db22317f91aaf5ce91249fbe747247db5abe1c91e58ed596","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:6a4bbdd2e0874516b0323a95bf3bae6e849045cee7b06061b02c0f968630cfde","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"editorial":{"advice":{"olap":"Run explicit ANALYZE/VACUUM after bulk loads instead of waiting only for proportional triggers; plan freezing and visibility-map advancement separately for append-only partitions.","oltp":"Tune autovacuum_vacuum_threshold from table size, change rate, and maintenance SLA, using per-table thresholds for large/hot relations. Observe trigger intervals, dead tuples, and ANALYZE/VACUUM duration.","small":"Start with upstream. Fixed thresholds dominate on small tables; after changes, confirm worker and I/O headroom."},"mechanism":["Minimum number of tuple updates or deletes prior to vacuum. A configuration reload applies a new value; existing work already in flight is not retroactively changed.","The ordinary automatic-vacuum threshold is the base term plus scale factor times reltuples, capped by autovacuum_vacuum_max_threshold from PG18. It reacts to dead tuples from updates/deletes, permits per-table overrides, and is separate from mandatory anti-wraparound vacuuming.","Monitor and change autovacuum_vacuum_threshold together with autovacuum_vacuum_scale_factor, autovacuum_vacuum_max_threshold, autovacuum_vacuum_insert_threshold. 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_threshold","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-THRESHOLD"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["autovacuum_vacuum_scale_factor","autovacuum_vacuum_max_threshold","autovacuum_vacuum_insert_threshold","autovacuum_vacuum_insert_scale_factor","autovacuum","autovacuum_analyze_scale_factor"],"summary":"autovacuum_vacuum_threshold — Minimum number of tuple updates or deletes prior to vacuum. Observed in PG9.0–19 Beta 4; its last measured boot default is 50 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.845694+08:00","intro_commit":{},"key":"autovacuum_vacuum_threshold","last_version":"20","max_val":"","min_val":"","name":"autovacuum_vacuum_threshold","position":35,"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:0bf2afb09d5f9c1977a07f33323a044ba66d4c4fda35d179f828b4574aae3346","receipt_sha256":"c1bbb6ddad5ce6a965f82f50097bf273826ef23b00d9a321cc48122bd7ce0a19","repair":"wiki-repair-20261023"},"short_desc":"Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table.","short_desc_zh":"","source_rev":"wiki-repair-20261023:6a4bbdd2e0874516b0323a95bf3bae6e849045cee7b06061b02c0f968630cfde","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"autovacuum_vacuum_threshold","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_vacuum_threshold","SourceRevision":"wiki-repair-20261023:6a4bbdd2e0874516b0323a95bf3bae6e849045cee7b06061b02c0f968630cfde","Facts":{"boot_val":"50","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. 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 的被更新或被删除元组的最小数量。默认值为 50 个元组。该参数只能在 postgresql.conf 文件或在服务器命令行上设置。但是对个别表可以通过修改表存储参数来覆盖该设置。","description_zh_html":"\u003cp\u003e\n        指定能在一个表上触发 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 的被更新或被删除元组的最小数量。默认值为 50 个元组。该参数只能在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 文件或在服务器命令行上设置。但是对个别表可以通过修改表存储参数来覆盖该设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-THRESHOLD","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"},"doc_html":"\u003cp\u003e\n         Specifies the minimum number of updated or deleted tuples needed\n         to trigger a \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e in any one table.\n         The default is 50 tuples.\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":null,"lang":"en","max_val":"2147483647","metadata_version":"18","min_val":"0","name":"autovacuum_vacuum_threshold","short_desc":"Minimum number of tuple updates or deletes prior to vacuum.","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-AUTOVACUUM-VACUUM-THRESHOLD","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_vacuum_threshold","SourceDatabase":"center","Version":"18","Locale":"en","Title":"autovacuum_vacuum_threshold","Summary":"Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. 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 minimum number of updated or deleted tuples needed\n         to trigger a \u003ccode\u003eVACUUM\u003c/code\u003e in any one table.\n         The default is 50 tuples.\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:6a4bbdd2e0874516b0323a95bf3bae6e849045cee7b06061b02c0f968630cfde","ContentHash":"e6c30b68e6da1597ccd39a43f4a80a344461ed20f4d8b61f670365ded143b96d","Payload":{"description":"Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. 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}
