{"Entry":{"collection":"guc","key":"autovacuum_vacuum_insert_scale_factor","name":"autovacuum_vacuum_insert_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":"12","status":"added","to":"13"},{"documentation_changed":true,"fields":{"category":{"from":"Autovacuum","to":"Vacuuming / Automatic Vacuuming"}},"from":"17","status":"changed","to":"18"}],"content_hash":"5f501db9eda585c9f29918446bd0e7f8e5f092f4dc3433fad65c0d259c417e67","context":"","default_changed_in":[],"default_history":[{"from":"13","to":"19","value":"0.2"}],"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_insert_scale_factor 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":["Number of tuple inserts prior to vacuum as a fraction of reltuples. A configuration reload applies a new value; existing work already in flight is not retroactively changed.","For insert-heavy tables the trigger is the insert threshold plus insert scale factor times reltuples times the fraction not all-frozen. Such vacuuming can advance visibility/freeze state even without dead tuples and reduce later aggressive-vacuum work.","Monitor and change autovacuum_vacuum_insert_scale_factor together with autovacuum_vacuum_threshold, autovacuum_vacuum_scale_factor, autovacuum_vacuum_max_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_insert_scale_factor","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-INSERT-SCALE-FACTOR"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["autovacuum_vacuum_threshold","autovacuum_vacuum_scale_factor","autovacuum_vacuum_max_threshold","autovacuum_vacuum_insert_threshold","autovacuum","autovacuum_analyze_scale_factor"],"summary":"autovacuum_vacuum_insert_scale_factor sets the number of tuple inserts prior to vacuum as a fraction of reltuples. It is a sighup setting present in PG13–18; the latest recorded boot default is 0.2."},"enumvals":[],"first_version":"13","group":"Vacuuming","group_slug":"vacuum","imported_at":"2026-09-27T17:57:30.82832+08:00","intro_commit":{"authored_at":"2020-03-28T19:20:12+13:00","discussion":["https://postgr.es/m/CAC8Q8t%2Bj36G_bLF%3D%2B0iMo6jGNWnLnWb1tujXuJr-%2Bx8ZCCTqoQ%40mail.gmail.com"],"hash":"b07642dbcd8d5de05f0ee1dbb72dd6760dd30436","subject":"Trigger autovacuum based on number of INSERTs","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=b07642dbcd8d5de05f0ee1dbb72dd6760dd30436"},"key":"autovacuum_vacuum_insert_scale_factor","last_version":"20","max_val":"","min_val":"","name":"autovacuum_vacuum_insert_scale_factor","position":29,"present_in":["13","14","15","16","17","18","19","20"],"short_desc":"Specifies a fraction of the unfrozen pages in the table to add to autovacuum_vacuum_insert_threshold when deciding whether to trigger a VACUUM.","short_desc_zh":"","source_rev":"english-manuals:b9582c34a80ada3406c09f08b6594bec28dadbaeaf319171cc242d18ca7d0a6b","unit":"","vartype":"real"}},"Definition":{"Collection":"guc","Key":"autovacuum_vacuum_insert_scale_factor","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_vacuum_insert_scale_factor","SourceRevision":"english-manuals:b9582c34a80ada3406c09f08b6594bec28dadbaeaf319171cc242d18ca7d0a6b","Facts":{"boot_val":"0.2","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies a fraction of the unfrozen pages in the table to add to autovacuum_vacuum_insert_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of unfrozen pages in table). 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-INSERT-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_insert_scale_factor","short_desc":"Number of tuple inserts prior to vacuum as a fraction of reltuples.","source":"pg-settings-source-snapshot","unit":null,"vartype":"real"},"ManualEvidence":{"doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-INSERT-SCALE-FACTOR","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_vacuum_insert_scale_factor","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"autovacuum_vacuum_insert_scale_factor","Summary":"","BodyHTML":"\u003cp\u003e指定表中未冻结页面的比例，在决定是否触发\u003ccode\u003eVACUUM\u003c/code\u003e时，将由该比例计算出的数量加到 \u003ccode\u003eautovacuum_vacuum_insert_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":"34dc9273d282ddfb56caed9e083be35e25f0f3edcfd3a9f748447b7e327c6aa8","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定表中未冻结页面的比例，在决定是否触发\u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e时，将由该比例计算出的数量加到 \u003ccode class=\"varname\"\u003eautovacuum_vacuum_insert_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":["13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
