Re: [HACKERS] Dbsize backend integration - Mailing list pgsql-patches

From Tom Lane
Subject Re: [HACKERS] Dbsize backend integration
Date
Msg-id 19998.1120605857@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Dbsize backend integration  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] Dbsize backend integration
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Disable page writes when fsync off, add GUC
Next
From: Satoshi Nagayasu
Date:
Subject: Re: enable/disable trigger (Re: Fwd: [HACKERS] Open items)