Re: Table size does not include toast size
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rafael Martinez <r.m.guerrero@usit.uio.no>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2009-12-21T15:31:33Z
Lists: pgsql-hackers
Rafael Martinez <r.m.guerrero@usit.uio.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