Re: pg_(total_)relation_size and partitioned tables

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pg_(total_)relation_size and partitioned tables
Дата
Msg-id CA+TgmobG69Nf4E+VKcojXZQa9FRsbr7Dd+NORJRFMh5Umer98w@mail.gmail.com
обсуждение исходный текст
Ответ на pg_(total_)relation_size and partitioned tables  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: pg_(total_)relation_size and partitioned tables  (David Rowley <david.rowley@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Dec 14, 2017 at 12:23 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> You may have guessed from $subject that the two don't work together.

It works exactly as documented:

pg_total_relation_size(regclass) - Total disk space used by the
specified table, including all indexes and TOAST data

It says nothing about including partitions.  If we change this, then
we certainly need to update the documentation (that might be a good
idea if we decide not to update this).

Personally, I'm -1 on including partitions, because then you can no
longer expect that the sum of pg_total_relation_size(regclass) across
all relations in the database will equal the size of the database
itself.  Partitions will be counted a number of times equal to their
depth in the partitioning hierarchy.  However, I understand that I
might get outvoted.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Protect syscache from bloating with negative cache entries