{"Entry":{"collection":"guc","key":"autovacuum_vacuum_insert_threshold","name":"autovacuum_vacuum_insert_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":"12","status":"added","to":"13"},{"documentation_changed":false,"fields":{"category":{"from":"Autovacuum","to":"Vacuuming / Automatic Vacuuming"},"extra_desc":{"from":null,"to":"-1 disables insert vacuums."},"short_desc":{"from":"Minimum number of tuple inserts prior to vacuum, or -1 to disable insert vacuums.","to":"Minimum number of tuple inserts prior to vacuum."}},"from":"17","status":"changed","to":"18"}],"content_hash":"859bc55d9b570e8e8b365ef6d1b9736d97fdf9e83cd196473965ab95ec480913","context":"","default_changed_in":[],"default_history":[{"from":"13","to":"19","value":"1000"}],"derived_content_hash":"b55c44aa5ebce433477f8292f091321251ec31854ad1af9028f44505c11b65e7","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:6b929c45312be14189e617369355c54b0b20df0a46b424ec09ec06e9707b9b96","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_insert_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 inserts prior to vacuum. 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_threshold 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_threshold","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-VACUUM-INSERT-THRESHOLD"},{"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_scale_factor","autovacuum","autovacuum_analyze_scale_factor"],"summary":"autovacuum_vacuum_insert_threshold sets the minimum number of tuple inserts prior to vacuum. It is a sighup setting present in PG13–18; the latest recorded boot default is 1000."},"enumvals":[],"first_version":"13","group":"Vacuuming","group_slug":"vacuum","imported_at":"2026-09-27T17:57:30.833803+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_threshold","last_version":"20","max_val":"","min_val":"","name":"autovacuum_vacuum_insert_threshold","position":31,"present_in":["13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:9c3f9d9fbf2e15fa70283f9b915da475f42736c3c716d77e0508cb4f556cddf2","receipt_sha256":"10d0fd873465526f400a1d67ec4ea5a73db1fa0409644c9a66ff0f809691575c","repair":"wiki-repair-20261023"},"short_desc":"Specifies the number of inserted tuples needed to trigger a VACUUM in any one table.","short_desc_zh":"","source_rev":"wiki-repair-20261023:6b929c45312be14189e617369355c54b0b20df0a46b424ec09ec06e9707b9b96","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"autovacuum_vacuum_insert_threshold","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_vacuum_insert_threshold","SourceRevision":"wiki-repair-20261023:6b929c45312be14189e617369355c54b0b20df0a46b424ec09ec06e9707b9b96","Facts":{"boot_val":"1000","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies the number of inserted tuples needed to trigger a VACUUM in any one table. The default is 1000 tuples. If -1 is specified, autovacuum will not trigger a VACUUM operation on any tables based on the number of inserts. 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 所需要插入的元组数。默认值为 1000 个元组。如果指定了 -1，则 autovacuum 不会根据插入数量在任何表上触发 VACUUM 操作。此参数只能在 postgresql.conf 文件或服务器命令行中设置；但可以通过更改表存储参数来覆盖单个表的设置。","description_zh_html":"\u003cp\u003e\n        指定在任何一个表中触发 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 所需要插入的元组数。默认值为 1000 个元组。如果指定了 -1，则 autovacuum 不会根据插入数量在任何表上触发 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 操作。此参数只能在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 文件或服务器命令行中设置；但可以通过更改表存储参数来覆盖单个表的设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-AUTOVACUUM-VACUUM-INSERT-THRESHOLD","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"},"doc_html":"\u003cp\u003e\n         Specifies the number of inserted tuples needed to trigger a\n         \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e in any one table.\n         The default is 1000 tuples.  If -1 is specified, autovacuum will not\n         trigger a \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e operation on any tables based on\n         the number of inserts.\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 disables insert vacuums.","lang":"en","max_val":"2147483647","metadata_version":"18","min_val":"-1","name":"autovacuum_vacuum_insert_threshold","short_desc":"Minimum number of tuple inserts 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-INSERT-THRESHOLD","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_vacuum_insert_threshold","SourceDatabase":"center","Version":"18","Locale":"en","Title":"autovacuum_vacuum_insert_threshold","Summary":"Specifies the number of inserted tuples needed to trigger a VACUUM in any one table. The default is 1000 tuples. If -1 is specified, autovacuum will not trigger a VACUUM operation on any tables based on the number of inserts. 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 number of inserted tuples needed to trigger a\n         \u003ccode\u003eVACUUM\u003c/code\u003e in any one table.\n         The default is 1000 tuples.  If -1 is specified, autovacuum will not\n         trigger a \u003ccode\u003eVACUUM\u003c/code\u003e operation on any tables based on\n         the number of inserts.\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:6b929c45312be14189e617369355c54b0b20df0a46b424ec09ec06e9707b9b96","ContentHash":"f8112fd173540fa1cfd14772eaac820705fded2d6ec5b5bb37e058ca9d8215f4","Payload":{"description":"Specifies the number of inserted tuples needed to trigger a VACUUM in any one table. The default is 1000 tuples. If -1 is specified, autovacuum will not trigger a VACUUM operation on any tables based on the number of inserts. 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":["13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
