Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Date
Msg-id 28829.1306441809@sss.pgh.pa.us
Whole thread Raw
In response to Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Except that's not how it works.  At least in the case of ANALYZE, we
> *aren't* counting all the tuples in the table.  We're selecting a
> random sample of pages and inferring a tuple density, which we then
> extrapolate to the whole table and store.  Then when we pull it back
> out of the table, we convert it back to a tuple density.  The real
> value we are computing and using almost everywhere is tuple density;
> storing a total number of tuples in the table appears to be just
> confusing the issue.

If we were starting in a green field we might choose to store tuple
density.  However, the argument for changing it now is at best mighty
thin; IMO it is not worth the risk of breaking client code.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Next
From: Tom Lane
Date:
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum