Re: Table size does not include toast size

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Table size does not include toast size
Date: 2009-12-21 17:02:02
Message-ID: 4B2FAA0A.1040208@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Perhaps invent pg_table_size() = base table + toast table + toast index
> and pg_indexes_size() = all other indexes for table
> giving us the property pg_table_size + pg_indexes_size =
> pg_total_relation_size
>
Right; that's exactly the way I'm computing things now, I just have to
crawl way too much catalog data to do it. I also agree that if we
provide pg_table_size, the issue of "pg_relation_size doesn't do what I
want" goes away without needing to even change the existing
documentation--people don't come to that section looking for "relation",
they're looking for "table".

Bernd, there's a basic spec if you have time to work on this.

--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-12-21 17:26:16 Re: Streaming replication and non-blocking I/O
Previous Message Tom Lane 2009-12-21 16:54:06 Re: Table size does not include toast size