Re: [HACKERS] Dbsize backend integration

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Dawid Kuroczko <qnex42(at)gmail(dot)com>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Dbsize backend integration
Date: 2005-07-06 01:18:01
Message-ID: 200507060118.j661I1T00525@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > If we go pg_table_size() and pg_relation_size(), which is object-only
> > and which is heap + index + toast? I think ideally we want
> > pg_relation_size to be the combined one, but then we have pg_table_size
> > that works on indexes and toast too, and that is confusing, and we don't
> > want to add index and toast versions. Or is an index a relation? And
> > TOAST?
>
> All the backend code thinks so --- anything that has an entry in
> pg_class is a relation. So personally I don't find "table" and
> "relation" confusing in this context. But I can see it might be
> confusing to people not familiar with PG jargon.
>
> > OK, how about pg_relation_size for heap/index/toast, and
> > pg_complete_relation_size for the combined total.
>
> I could live with that. Or "pg_total_relation_size".

The problem with "total", to me, is that it already is the total size of
the heap/index/toast. Complete has the idea of adding additional
pieces, which I think fits best.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2005-07-06 02:18:56 Re: timezone changes break windows and cygwin
Previous Message Andrew - Supernews 2005-07-05 23:51:51 oids vs composite types, in cvs head

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-07-06 02:38:36 Re: [HACKERS] Dbsize backend integration
Previous Message Satoshi Nagayasu 2005-07-05 23:41:24 Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)