From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Florian Helmberger <fh@25th-floor.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Date: Thu, 26 May 2011 12:28:11 -0500
Message-ID: <4DDE475B020000250003DD63@gw.wicourts.gov> (raw)
In-Reply-To: <BANLkTikxM6V5DUsXnDEs84z=oRMbyeoOgA@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>
<25097.1306426982@sss.pgh.pa.us>
<BANLkTikxM6V5DUsXnDEs84z=oRMbyeoOgA@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> wrote:
> I think we should really consider replacing reltuples with
> reltupledensity at some point. I continue to be afraid that using
> a decaying average in this case is going to end up overweighting
> the values from some portion of the table that's getting scanned
> repeatedly, at the expense of other portions of the table that are
> not getting scanned at all. Now, perhaps experience will prove
> that's not a problem. But storing relpages and reltupledensity
> separately would give us more flexibility, because we could feel
> free to bump relpages even when we're not sure what to do about
> reltupledensity. That would help Florian's problem quite a lot,
> even if we did nothing else.
Given how trivial it would be to adjust reltuples to keep its ratio
to relpages about the same when we don't have a new "hard" number,
but some evidence that we should fudge our previous value, I don't
see where this change buys us much. It seems to mostly obfuscate
the fact that we're changing our assumption about how many tuples we
have. I would rather that we did that explicitly with code comments
about why it's justified than to slip it in the way you suggest.
-Kevin
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, fh@25th-floor.com, alvherre@commandprompt.com, gsstark@mit.edu, pgsql-hackers@postgresql.org
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
In-Reply-To: <4DDE475B020000250003DD63@gw.wicourts.gov>
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> <25097.1306426982@sss.pgh.pa.us> <BANLkTikxM6V5DUsXnDEs84z=oRMbyeoOgA@mail.gmail.com> <4DDE475B020000250003DD63@gw.wicourts.gov>
* 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