Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>, Florian Helmberger <fh@25th-floor.com>, Alvaro Herrera <alvherre@commandprompt.com>, Greg Stark <gsstark@mit.edu>, pgsql-hackers@postgresql.org
Date: 2011-05-27T18:34:10Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Still, maybe we don't have a better option.  If it were me, I'd add an
> additional safety valve: use your formula if the percentage of the
> relation scanned is above some threshold where there's unlikely to be
> too much skew.  But if the percentage scanned is too small, then don't
> use that formula.  Instead, only update relpages/reltuples if the
> relation is now larger; set relpages to the new actual value, and
> scale up reltuples proportionately.

Ah, progress: now we're down to arguing about the size of the fudge
factor ;-).  I'll do something involving derating the reliability
when the number is coming from VACUUM.

			regards, tom lane