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

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Florian Helmberger" <fh(at)25th-floor(dot)com>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Greg Stark" <gsstark(at)mit(dot)edu>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Date: 2011-05-26 17:28:11
Message-ID: 4DDE475B020000250003DD63@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Robert Haas 2011-05-26 17:50:45 Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Previous Message Robert Haas 2011-05-26 17:08:46 Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum

Browse pgsql-hackers by date

  From Date Subject
Next Message Emanuel Calvo 2011-05-26 17:38:34 Re: BUG #6041: Unlogged table was created bad in slave node
Previous Message Tom Lane 2011-05-26 17:14:03 Re: Pre-alloc ListCell's optimization