From: Alvaro Herrera <alvherre@commandprompt.com>
To: Kevin Grittner <kevin.grittner@wicourts.gov>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Florian Helmberger <fh@25th-floor.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
Date: Wed, 25 May 2011 12:55:09 -0400
Message-ID: <1306342228-sup-2964@alvh.no-ip.org> (raw)
In-Reply-To: <4DDCE9F4020000250003DC48@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>
<1306339028-sup-6948@alvh.no-ip.org>
<22173.1306340636@sss.pgh.pa.us>
<4DDCE9F4020000250003DC48@gw.wicourts.gov>
Excerpts from Kevin Grittner's message of mié may 25 12:37:24 -0400 2011:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> > I don't know what client-side code might be looking at
> > relpages/reltuples.
>
> I know that I find reltuples useful for getting an "accurate enough"
> sense of rows in a table (or set of tables) without resorting to
> count(*). I'd be OK with any two of pages, tuples, and density; but
> dropping to one would make databases harder to manage, IMV.
>
> Personally, I don't have much code that uses those columns;
> eliminating an existing column wouldn't involve much pain for me as
> long as it could still be derived.
Well, we only actually need to store one number, because you can figure
out a much more precise number-of-pages figure with pg_relation_size()
divided by configured page size.
(We feel free to hack around catalogs in other places, and we regularly
break pgAdmin and the like when we drop columns -- people just live with
it and update their tools. I don't think it's such a big deal in this
particular case.)
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
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: alvherre@commandprompt.com, kevin.grittner@wicourts.gov, tgl@sss.pgh.pa.us, fh@25th-floor.com, pgsql-hackers@postgresql.org
Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum
In-Reply-To: <1306342228-sup-2964@alvh.no-ip.org>
* 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