Re: Table size does not include toast size

Поиск
Список
Период
Сортировка
От Rafael Martinez
Тема Re: Table size does not include toast size
Дата
Msg-id 4B2F9648.8080305@usit.uio.no
обсуждение исходный текст
Ответ на Re: Table size does not include toast size  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bernd Helmle wrote:
> 
> 
> --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?
> 

It is a possibility. But I really think that pg_relation_size() not
reporting the total size of the table (without indexes) is useless.

toast is an internal way of organizing/saving data for tuples larger
than the page size used by PostgreSQL. It is a mechanism transparent to
the user and therefore pg_relation_size() should not differentiate
between data saved via toast or not.

The size of the table without the indexes should be reported regardless
the technique used to save the data on the disk.

regards,
- --Rafael Martinez, <r.m.guerrero@usit.uio.no>Center for Information Technology ServicesUniversity of Oslo, Norway
PGP Public Key: http://folk.uio.no/rafael/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQFLL5ZHBhuKQurGihQRAoR8AJ97RoST3VHGCmcIOhkdRbJIWb3mnwCeN7Mm
7Oja4kmyrQfM6/RxyUE4K2A=
=kxO9
-----END PGP SIGNATURE-----


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Table size does not include toast size
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Small Bug in GetConflictingVirtualXIDs