Re: BUG #15245: pg_stat_all_tables does not include partition master tables

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: mahadevan(at)rapidloop(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15245: pg_stat_all_tables does not include partition master tables
Date: 2018-06-18 06:05:30
Message-ID: 20180618060530.GH3721@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2018-06-18 09:27:21 Re: BUG #15245: pg_stat_all_tables does not include partition master tables
Previous Message David Rowley 2018-06-18 05:49:47 Re: BUG #15245: pg_stat_all_tables does not include partition master tables