Re: ToDo: show size of partitioned table - Mailing list pgsql-hackers

From Amit Langote
Subject Re: ToDo: show size of partitioned table
Date
Msg-id 1ea05dd1-1712-7418-7fbb-04765ee5f8dc@lab.ntt.co.jp
Whole thread Raw
In response to Re: ToDo: show size of partitioned table  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: ToDo: show size of partitioned table
List pgsql-hackers
On 2018/06/02 0:15, Ashutosh Bapat wrote:
> I think we should at least display "Type" as "partitioned table" for a
> partitioned table, so that it's easy to understand why the size is 0;
> partitioned tables do not hold any data by themselves.

There was a long discussion last year (during PG 10 beta period), such as
[1], and it seems most of us agreed to doing the above.  Maybe, we should
finally do it for PG 12, if not PG 11.

Regarding showing the size of partitioned tables, there are many opinions
and it's not clear if showing it in \dt itself is appropriate.  For one,
there is no pg_relation_size() or pg_table_size() equivalent in the
backend for aggregating the size of all tables in a partition tree and I
think people are not quite on board about having such a function in the
backend [2].

Thanks,
Amit

[1]
https://www.postgresql.org/message-id/flat/7dfc13c5-d6b7-1ff1-4bef-d75d6d2f76d9%40lab.ntt.co.jp

[2]
https://www.postgresql.org/message-id/flat/495cec7e-f8d9-7e13-4807-90dbf4eec4ea%40lab.ntt.co.jp



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Spilling hashed SetOps and aggregates to disk
Next
From: Michael Paquier
Date:
Subject: Re: Adding tests for inheritance trees with temporary tables