Re: Table size does not include toast size - Mailing list pgsql-hackers

From Bernd Helmle
Subject Re: Table size does not include toast size
Date
Msg-id 570EEFCC647EC937E0883225@amenophis
Whole thread Raw
In response to Re: Table size does not include toast size  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Table size does not include toast size
Re: Table size does not include toast size
List pgsql-hackers

--On 21. Dezember 2009 10:01:37 -0500 Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Rafael Martinez
Date:
Subject: Re: Table size does not include toast size
Next
From: Alvaro Herrera
Date:
Subject: Re: Small Bug in GetConflictingVirtualXIDs