{"Entry":{"collection":"guc","key":"vacuum_cleanup_index_scale_factor","name":"vacuum_cleanup_index_scale_factor","aliases":[],"metadata":{"baseline":false,"boot_human":"0.1","boot_val":"0.1","category":"Client Connection Defaults / Statement Behavior","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"10","status":"added","to":"11"},{"documentation_changed":true,"fields":{},"from":"12","status":"changed","to":"13"},{"documentation_changed":false,"fields":{},"from":"13","status":"removed","to":"14"}],"content_hash":"05c97cb5c6e840f4ec80248fde9a9081734dcd26bff01731a689e46121cfc585","context":"user","default_changed_in":[],"default_history":[{"from":"11","to":"13","value":"0.1"}],"editorial":{"advice":{"olap":"For legacy bulk-load systems, measure actual index maintenance rather than carrying this removed knob forward as configuration folklore.","oltp":"Do not tune vacuum_cleanup_index_scale_factor for a current server: PostgreSQL removed it in 14. On PostgreSQL 11–13, change it only for a measured index-cleanup problem and plan the upgrade behavior.","small":"Leave the legacy default and upgrade; a removed parameter is not a durable way to manage small-node vacuum cost."},"mechanism":["vacuum_cleanup_index_scale_factor sets the number of tuple inserts prior to index cleanup as a fraction of reltuples. The PostgreSQL 11–13 knob delayed index cleanup after inserts; it was removed in PostgreSQL 14 when the index-cleanup decision model changed.","vacuum_cleanup_index_scale_factor is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.","The legacy decision applied to B-tree cleanup scans and interacted with VACUUM statistics, inserted tuples, reusable index pages, and autovacuum scheduling; it was not a GIN control."],"pitfalls":["Changing vacuum_cleanup_index_scale_factor in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.","Applying an old B-tree cleanup heuristic without measuring index scans, reusable pages, and VACUUM behavior on the exact release.","Confusing a removed session default with current autovacuum thresholds or per-table storage parameters.","Keeping an unknown-parameter line during a PostgreSQL 14+ upgrade."],"references":[{"title":"PostgreSQL 12: vacuum_cleanup_index_scale_factor","url":"https://www.postgresql.org/docs/12/runtime-config-client.html#GUC-VACUUM-CLEANUP-INDEX-SCALE-FACTOR"}],"related":["autovacuum","autovacuum_vacuum_scale_factor","vacuum_cost_limit","vacuum_cost_delay","maintenance_work_mem","autovacuum_work_mem"],"summary":"vacuum_cleanup_index_scale_factor is the PostgreSQL setting that defines the number of tuple inserts prior to index cleanup as a fraction of reltuples."},"enumvals":[],"first_version":"11","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:32.264323+08:00","intro_commit":{"authored_at":"2018-04-04T19:29:00+03:00","discussion":["https://www.postgresql.org/message-id/flat/CAD21AoAX+d2oD_nrd9O2YkpzHaFr=uQeGr9s1rKC3O4ENc568g@mail.gmail.com"],"hash":"857f9c36cda520030381bd8c2af20adf0ce0e1d4","subject":"Skip full index scan during cleanup of B-tree indexes when possible","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=857f9c36cda520030381bd8c2af20adf0ce0e1d4"},"key":"vacuum_cleanup_index_scale_factor","last_version":"13","max_val":"1e+10","min_val":"0","name":"vacuum_cleanup_index_scale_factor","position":445,"present_in":["11","12","13"],"short_desc":"Specifies the fraction of the total number of heap tuples counted in the previous statistics collection that can be inserted without incurring an index scan at the VACUUM cleanup stage.","short_desc_zh":"","source_rev":"english-manuals:dae76bd228955cd1d6455fba88481ce668f714177b73e1669a740957536a0baf","unit":"","vartype":"real"}},"Definition":{"Collection":"guc","Key":"vacuum_cleanup_index_scale_factor","SourceDatabase":"center","Version":"13","SourceTable":"guc","SourceKey":"vacuum_cleanup_index_scale_factor","SourceRevision":"english-manuals:dae76bd228955cd1d6455fba88481ce668f714177b73e1669a740957536a0baf","Facts":{"boot_val":"0.1","category":"Client Connection Defaults / Statement Behavior","context":"user","description":"","doc":{},"documented":false,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"1e+10","metadata_version":"13","min_val":"0","name":"vacuum_cleanup_index_scale_factor","short_desc":"Number of tuple inserts prior to index cleanup as a fraction of reltuples.","source":"pg-settings-source-snapshot","unit":null,"vartype":"real"},"ManualEvidence":{"doc":{}},"MeasuredEvidence":{"metadata_version":"13"}},"Text":{"Collection":"guc","Key":"vacuum_cleanup_index_scale_factor","SourceDatabase":"","Version":"","Locale":"","Title":"","Summary":"","BodyHTML":"","SourceRevision":"","ContentHash":"","Payload":null},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["11","12","13"],"Locales":[],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
