{"Entry":{"collection":"guc","key":"autovacuum_analyze_threshold","name":"autovacuum_analyze_threshold","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Vacuuming / Automatic Vacuuming","category_zh":"","changed_in":["9.2","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":false,"fields":{"short_desc":{"from":"Minimum number of tuple inserts, updates or deletes prior to analyze.","to":"Minimum number of tuple inserts, updates, or deletes prior to analyze."}},"from":"9.1","status":"changed","to":"9.2"},{"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":"9e89127ac508d09b2a3fc272cb17d6ff113410eb5e2bc1c1b5ad496183671efe","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"50"}],"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_analyze_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, updates, or deletes prior to analyze. A configuration reload applies a new value; existing work already in flight is not retroactively changed.","The automatic-ANALYZE trigger is autovacuum_analyze_threshold plus autovacuum_analyze_scale_factor times pg_class.reltuples; inserts, updates, and deletes feed the cumulative counter. Per-table storage parameters can override the global values, and the statistics are eventually consistent estimates.","Monitor and change autovacuum_analyze_threshold together with autovacuum_analyze_scale_factor, default_statistics_target, track_counts. 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_analyze_threshold","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-ANALYZE-THRESHOLD"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["autovacuum_analyze_scale_factor","default_statistics_target","track_counts","autovacuum","autovacuum_freeze_max_age","autovacuum_max_workers"],"summary":"autovacuum_analyze_threshold — Minimum number of tuple inserts, updates, or deletes prior to analyze. 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.790919+08:00","intro_commit":{},"key":"autovacuum_analyze_threshold","last_version":"20","max_val":"","min_val":"","name":"autovacuum_analyze_threshold","position":19,"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 the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE in any one table.","short_desc_zh":"","source_rev":"english-manuals:dce6679692c879bb2ec37c7c2458bbebd15f8243b3cbf6b6c196603d02c23b92","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"autovacuum_analyze_threshold","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_analyze_threshold","SourceRevision":"english-manuals:dce6679692c879bb2ec37c7c2458bbebd15f8243b3cbf6b6c196603d02c23b92","Facts":{"boot_val":"50","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE 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.","doc":{"anchor":"GUC-AUTOVACUUM-ANALYZE-THRESHOLD","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"2147483647","metadata_version":"18","min_val":"0","name":"autovacuum_analyze_threshold","short_desc":"Minimum number of tuple inserts, updates, or deletes prior to analyze.","source":"pg-settings-source-snapshot","unit":null,"vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-AUTOVACUUM-ANALYZE-THRESHOLD","file":"runtime-config-vacuum.html","lang":"en","sha256":"7047f1fa9138b97f1812532f8a905fa7479451dfd64655e029a7d387b20b22e4","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_analyze_threshold","SourceDatabase":"center","Version":"18","Locale":"en","Title":"autovacuum_analyze_threshold","Summary":"Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE 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\u003eSpecifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE 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.\u003c/p\u003e","SourceRevision":"english-manuals:dce6679692c879bb2ec37c7c2458bbebd15f8243b3cbf6b6c196603d02c23b92","ContentHash":"3ff17c057bbfd3d92296e8a7ddf7a5e64be6a7c13a4236d03c38cb4822459633","Payload":{"description":"Specifies the minimum number of inserted, updated or deleted tuples needed to trigger an ANALYZE 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":"zh-Hans","Fallback":true,"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"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
