From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Florian Helmberger <fh@25th-floor.com>
Cc: pgsql-hackers@postgresql.org, Alvaro Herrera <alvherre@commandprompt.com>
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Date: Thu, 26 May 2011 12:23:02 -0400
Message-ID: <25097.1306426982@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTikrCaoZCVrda6SNCUQFiYvvZX75BA@mail.gmail.com>
References: <4DD28F73.6010108@25th-floor.com>
<25017.1306291669@sss.pgh.pa.us>
<4DDCA801.70805@25th-floor.com>
<19738.1306338472@sss.pgh.pa.us>
<BANLkTi=973Arh-nXLO6YFP7_ZTCeNp-X7w@mail.gmail.com>
<22497.1306341699@sss.pgh.pa.us>
<BANLkTi=jcKSU5zR+JG2BvfLNCtezC9sb+g@mail.gmail.com>
<15043.1306423500@sss.pgh.pa.us>
<BANLkTikrCaoZCVrda6SNCUQFiYvvZX75BA@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> I would feel a lot better about something that is deterministic, like,
> I dunno, if VACUUM visits more than 25% of the table, we use its
> estimate. And we always use ANALYZE's estimate. Or something.
This argument seems to rather miss the point. The data we are working
from is fundamentally not deterministic, and you can't make it so by
deciding to ignore what data we do have. That leads to a less useful
estimate, not a more useful estimate.
> Another thought: Couldn't relation_needs_vacanalyze() just scale up
> reltuples by the ratio of the current number of pages in the relation
> to relpages, just as the query planner does?
Hmm ... that would fix Florian's immediate issue, and it does seem like
a good change on its own merits. But it does nothing for the problem
that we're failing to put the best available information into pg_class.
Possibly we could compromise on doing just that much in the back
branches, and the larger change for 9.1?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, gsstark@mit.edu, fh@25th-floor.com, alvherre@commandprompt.com
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
In-Reply-To: <25097.1306426982@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox