Re: Table size does not include toast size

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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:25:07
Message-ID: 570EEFCC647EC937E0883225@amenophis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On 21. Dezember 2009 10:01:37 -0500 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> It's not supposed to. Use pg_total_relation_size if you want a number
> that includes index and toast space.

I've created a C-Function a while ago that extracts the TOAST size for a
given relation. This gave me the opportunity to do a pg_relation_size(oid)
+ pg_relation_toast_size(oid) for a given table oid to calculate on disk
data size required by a table. Maybe we should include such a function in
core?

--
Thanks

Bernd

In response to

Responses

Browse pgsql-hackers by date

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