Jason Ralph <jralph@affinitysolutions.com> writes:
> I am trying to find out if the naming convention from autovacuum does what its command line equivalent does, or at
leastwhat I think it does.
> QUERY: autovacuum: VACUUM ANALYZE table versus autovacuum: VACUUM ANALYZE table.
> I have been getting my autovacuum tuned and I have the settings where I see 2 types of queries running now and doing
theirjobs. I know vacuum alone will mark dead tuples ready for use again, and analyze alone will update statistics for
thequery planner.
> 1. QUERY: autovacuum: VACUUM ANALYZE table
> 2. QUERY: autovacuum: VACUUM table
> My question is do we need both?
Some autovacuum runs will do only VACUUM on a given table, some will do
only ANALYZE, and some will do both. The decisions about which of
these operations are needed are related but not identical (one's based
on n_dead_tup and the other on n_mod_since_analyze, plus you can set
different threshold parameters to compare those to). The pg_stat_activity
report of what's happening does match the command-line syntax.
regards, tom lane