Re: [HACKERS] Dbsize backend integration

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(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-05 23:24:17
Message-ID: 19998.1120605857@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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".

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Satoshi Nagayasu 2005-07-05 23:41:24 Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
Previous Message Tom Lane 2005-07-05 23:20:48 Re: pgcrypto 3des failure, OpenSSL 0.9.8, Solaris 9/sparc

Browse pgsql-patches by date

  From Date Subject
Next Message Satoshi Nagayasu 2005-07-05 23:41:24 Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)
Previous Message Bruce Momjian 2005-07-05 23:19:14 Re: Disable page writes when fsync off, add GUC