{"Entry":{"collection":"guc","key":"autovacuum_vacuum_scale_factor","name":"autovacuum_vacuum_scale_factor","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.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":"090a9716c587572be3ea7c6e8d1f94aaf0ef1e2c74888c9d269f10bdcc763841","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"0.2"}],"editorial":{"advice":{"olap":"For append-and-batch workloads, coordinate the threshold with load cycles and explicit VACUUM/ANALYZE. A low global factor can create unwanted maintenance during bulk jobs.","oltp":"Use lower per-table values on large, update-heavy tables so dead tuples do not accumulate into a large absolute backlog. Validate with table churn and vacuum duration rather than selecting a percentage in isolation.","small":"The upstream default is often adequate for genuinely small tables. Tune exceptions per table; a low cluster-wide value can create frequent tiny vacuums."},"mechanism":["The core trigger is the base threshold plus this factor multiplied by pg_class.reltuples, an approximate row count. In PostgreSQL 18 the result is also capped by autovacuum_vacuum_max_threshold.","This trigger counts tuples made obsolete by UPDATE or DELETE; insert-driven vacuuming has its own threshold and scale factor. Anti-wraparound vacuuming is governed by transaction-age rules and can run independently of this setting.","A table-level autovacuum_vacuum_scale_factor storage parameter overrides the global value, which is often preferable when table sizes and update rates vary widely."],"pitfalls":["A percentage that looks small can still represent millions of dead tuples on a large table.","Lowering the factor globally can create continuous I/O pressure across many tables.","It does not control insert-triggered vacuuming or anti-wraparound vacuuming.","reltuples is an estimate, so the trigger is not an exact dead-row percentage.","Table storage parameters can silently make the global value irrelevant for that table."],"references":[{"title":"PostgreSQL 19 Beta 4: autovacuum_vacuum_scale_factor","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-SCALE-FACTOR"},{"title":"PostgreSQL 18: Autovacuum trigger formulas","url":"https://www.postgresql.org/docs/18/routine-vacuuming.html#AUTOVACUUM"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["autovacuum_vacuum_threshold","autovacuum_vacuum_max_threshold","autovacuum_vacuum_insert_scale_factor","autovacuum_analyze_scale_factor","autovacuum_naptime","autovacuum_freeze_max_age"],"summary":"Controls the table-size-proportional part of the normal autovacuum VACUUM trigger. Lower values make large tables eligible after a smaller fraction of rows becomes obsolete."},"enumvals":[],"first_version":"8.1","group":"Vacuuming","group_slug":"vacuum","imported_at":"2026-09-27T17:57:30.839836+08:00","intro_commit":{},"key":"autovacuum_vacuum_scale_factor","last_version":"20","max_val":"","min_val":"","name":"autovacuum_vacuum_scale_factor","position":33,"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 a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM.","short_desc_zh":"","source_rev":"english-manuals:5492749b74cde5423375acc86fa30541f4081c00c1bbf12b68aa82de7effdcce","unit":"","vartype":"real"}},"Definition":{"Collection":"guc","Key":"autovacuum_vacuum_scale_factor","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_vacuum_scale_factor","SourceRevision":"english-manuals:5492749b74cde5423375acc86fa30541f4081c00c1bbf12b68aa82de7effdcce","Facts":{"boot_val":"0.2","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size). 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-SCALE-FACTOR","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"100","metadata_version":"18","min_val":"0","name":"autovacuum_vacuum_scale_factor","short_desc":"Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.","source":"pg-settings-source-snapshot","unit":null,"vartype":"real"},"ManualEvidence":{"doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-SCALE-FACTOR","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_vacuum_scale_factor","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"autovacuum_vacuum_scale_factor","Summary":"","BodyHTML":"\u003cp\u003e指定一个表尺寸的分数，在决定是否触发\u003ccode\u003eVACUUM\u003c/code\u003e时将它加到\u003ccode\u003eautovacuum_vacuum_threshold\u003c/code\u003e上。默认值为\u003ccode\u003e0.2\u003c/code\u003e（表尺寸的20%）。该参数只能在\u003ccode\u003epostgresql.conf\u003c/code\u003e文件或在服务器命令行上设置。但是对个别表可以通过修改表存储参数来覆盖该设置。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"1b7bc06990b3af19ffae20e712566804a51091330d028c6268ecff58268a9654","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定一个表尺寸的分数，在决定是否触发\u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e时将它加到\u003ccode class=\"varname\"\u003eautovacuum_vacuum_threshold\u003c/code\u003e上。默认值为\u003ccode class=\"literal\"\u003e0.2\u003c/code\u003e（表尺寸的20%）。该参数只能在\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}
