Re: Vacuum on the database versus individual tables.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>, "Hartman, Matthew" <Matthew(dot)Hartman(at)krcc(dot)on(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: Vacuum on the database versus individual tables.
Date: 2009-06-25 16:20:40
Message-ID: 23413.1245946840@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dave Page <dpage(at)pgadmin(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message johnf 2009-06-25 16:30:02 datestyle no effect in 8.3.7
Previous Message Hartman, Matthew 2009-06-25 16:17:54 Re: Vacuum on the database versus individual tables.