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

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Mahadevan Ramachandran <mahadevan(at)rapidloop(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <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-19 01:24:14
Message-ID: d6575c06-9bf0-10e8-5dae-9a8dd1c6a0cb@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello.

On 2018/06/18 22:58, Mahadevan Ramachandran wrote:
> On Mon, Jun 18, 2018 at 3:51 PM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> about how to aggregate across partitions. We could leave that NULL for
>> now, that is, if we decide to list partitioned tables in the
>> pg_stat_all_tables output at all re OP's complaint.
>
> "Complaint" is too strong a word :-)

Ah, maybe "opinion" would've been more appropriate. ;-)

> I guess the real issue is that both options are a bit inconsistent. Not listing
> a partitoned table in an "all tables" view does not seem any worse or better
> than having it there with all columns as NULL. Should've thought about it
> before I raised the bug :-)

Yeah.

> Might I suggest a new system view that lists all (parent, child) associations,
> which can then be joined with pg_stat_all_tables so users can roll up
> child table stats into each parent using whatever aggregation functions
> they'd like?

I guess that's more or less what Michael mentioned upthread. That we need
a user-level function(s) that exposes the partition tree structure and
perhaps an accompanying view that makes inspecting the stats, relation
sizes, etc. of the tables in a given partition tree easier.

Thanks,
Amit

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2018-06-19 01:49:17 Re: BUG #15245: pg_stat_all_tables does not include partition master tables
Previous Message David G. Johnston 2018-06-18 22:41:42 Re: BUG #15246: Does not allow an INOUT parameter to receive values when its data type is a user-defined data type.