Auto Vacuum executes Vacuum and Analyze when the threshold is exceeded. The threshold values are as follows:
- autovacuum_vacuum_threshold + autovacuum_vacuum_scale_factor * rows
- autovacuum_analyze_threshold + autovacuum_analyze_scale_factor * rows
In PostgreSQL, is there a way to stop Analyze while keeping Auto Vacuum's Vacuum running automatically?
The best you can do is set
autovacuum_analyze_scale_factorto its maximum 100 for that table, then it will only be analyzed once 100 times as many rows have been modified as are in the table.But it is not a smart idea to disable autoanalyze, and you shouldn't do it.