Re: BUG #15245: pg_stat_all_tables does not include partition mastertables - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #15245: pg_stat_all_tables does not include partition mastertables
Date
Msg-id 20180618060530.GH3721@paquier.xyz
Whole thread Raw
In response to Re: BUG #15245: pg_stat_all_tables does not include partition master tables  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: BUG #15245: pg_stat_all_tables does not include partition mastertables  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-bugs
On Mon, Jun 18, 2018 at 05:49:47PM +1200, David Rowley wrote:
> FWIW there was a similar discussion of whether
> pg_relation_size('<partitioned table>') should report the sizes of all
> its partitions in [1].  Most people seemed to vote to leave it
> returning 0.
>
> Some of the same reasoning might apply to this case.
>
> [1] https://www.postgresql.org/message-id/495cec7e-f8d9-7e13-4807-90dbf4eec4ea@lab.ntt.co.jp

Having a wrapper on top of find_all_inheritors() which grabs all the
relations in a partition tree would be more helpful for all those cases
in my opinion, and this could just aggregate with pg_relation_size.
That's also discussed at the bottom of the thread David is mentioning.
It would be nice to get that into v12.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #15245: pg_stat_all_tables does not include partition master tables
Next
From: Amit Langote
Date:
Subject: Re: BUG #15245: pg_stat_all_tables does not include partition mastertables