Re: Table size does not include toast size

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Table size does not include toast size
Date: 2009-12-21 15:31:33
Message-ID: 15195.1261409493@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> writes:
> I am probably missing the point here, why is it not supposed to show the
> size of the table(data) *without* indexes?

Because pg_relation_size is defined at the "physical" level of showing
one relation, where relation means a pg_class entry. If you want
agglomerations of multiple relations, you can use
pg_total_relation_size, or build your own total if you have some other
usage in mind. The one you propose seems fairly arbitrary --- for
example, if it includes the toast relation, why not the toast relation's
index too? It's not like either one is optional from the user's
standpoint.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rafael Martinez 2009-12-21 15:37:44 Re: Table size does not include toast size
Previous Message Alvaro Herrera 2009-12-21 15:25:34 Re: Small Bug in GetConflictingVirtualXIDs