Dave Page <dpage@pgadmin.org> writes:
> pgAdmin will advise vacuuming a table if there is a significant
> discrepancy between the number of rows in the table and the value in
> pg_class.reltuples. i forget the exact algorithm off-hand, but it
> takes the size of the table into account, and is looking for a %age
> difference between the value, not a set number of rows.
What actually counts is the tuple density (ie, the reltuples/relpages
ratio). I would hope that it's checking whether that is off from
reality, not whether the absolute value is correct. Otherwise it's
going to be recommending useless vacuums.
(Actually, I'm not sure such a functionality is needed at all anymore
unless the user has disabled autovacuum...)
regards, tom lane