Re: Table size does not include toast size
От | Rafael Martinez |
---|---|
Тема | Re: Table size does not include toast size |
Дата | |
Msg-id | 4B2F9349.6070309@usit.uio.no обсуждение исходный текст |
Ответ на | Re: Table size does not include toast size (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Table size does not include toast size
|
Список | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tom Lane wrote: > Rafael Martinez <r.m.guerrero@usit.uio.no> writes: >> I wonder why the function pg_relation_size(text) does not take into >> account the space used by toast data in a table when returning the space >> used by the table. > > It's not supposed to. Use pg_total_relation_size if you want a number > that includes index and toast space. > I am probably missing the point here, why is it not supposed to show the size of the table(data) *without* indexes? My question was because I can not understand the use and usefulness of pg_relation_size() (as it works today) in a table that use toast. - From an administrator point of view, there are two numbers that are interesting, the total size of a table (indexes included) and the size of the table without taking into account the space used by its indexes. At least, if there is a logic in this behavior, it should be documented in "9.23. System Administration Functions". The documentation only says "Disk space used by the table or index with ...." It is not the first time confused users have asked me why pg_relation_size() does not show the space used by the table without indexes. Many do not know what 'toast' is, and most probably they do not need to know about this either. 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) iD8DBQFLL5NCBhuKQurGihQRAmtZAJ99wJPKbS1u2RUGxO4G++X7nbqt2gCeJubn b+328nrEICsXPS7kgD4bq68= =bBO8 -----END PGP SIGNATURE-----
В списке pgsql-hackers по дате отправления: