pg_relation_size on partitioned table

Поиск
Список
Период
Сортировка
От Japin Li
Тема pg_relation_size on partitioned table
Дата
Msg-id MEYP282MB1669B820AE730A48B2FC6E6FB61A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: pg_relation_size on partitioned table  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: pg_relation_size on partitioned table  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: pg_relation_size on partitioned table  (Justin Pryzby <pryzby@telsasoft.com>)
Re: pg_relation_size on partitioned table  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi, hackers

When I try to get total size of partition tables though partitioned table
name using pg_relation_size(), it always returns zero.  I can use the
following SQL to get total size of partition tables, however, it is a bit
complex.

    SELECT
        pg_size_pretty(sum(pg_relation_size(i.inhrelid)))
    FROM
        pg_class c JOIN pg_inherits i ON c.oid = i.inhparent
    WHERE
        relname = 'parent';

Could we provide a function to get the total size of the partition table
though the partitioned table name?  Maybe we can extend
the pg_relation_size() to get the total size of partition tables through
the partitioned table name.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



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

Предыдущее
От: Dagfinn Ilmari Mannsåker
Дата:
Сообщение: Re: Small TAP tests cleanup for Windows and unused modules
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_relation_size on partitioned table