pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Mahadevan Ramachandran <mahadevan@rapidloop.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15245: pg_stat_all_tables does not include partition master tables
Date: Tue, 19 Jun 2018 10:24:14 +0900
Message-ID: <d6575c06-9bf0-10e8-5dae-9a8dd1c6a0cb@lab.ntt.co.jp> (raw)
In-Reply-To: <CADjCDK9v4LK+8HhtjFeF4D1q5W=OgCPwA6S2oP47nCVM4zafkQ@mail.gmail.com>
References: <152922564661.24801.3078728743990100425@wrigleys.postgresql.org>
	<20180617120653.GD1411@paquier.xyz>
	<CADjCDK9APQLYPt4F2TH5xSEEYjFCe7nLphEe7L7EHV7-WuAB_A@mail.gmail.com>
	<CAKFQuwaV0Zz5_e7CmJoP_ULRsZ-G2y6fmMF-4QZP6eGso3J7Dg@mail.gmail.com>
	<20180618020642.GC3721@paquier.xyz>
	<16ac0ae3-f0ba-536f-92e2-4a954dce8bbf@lab.ntt.co.jp>
	<CAKJS1f98mP75ki_gbOfXffhC4FsEtURgVunO8Z0eZN-5m5ji-A@mail.gmail.com>
	<a44eb853-fda3-29f5-9b4d-1cc65b1485ab@lab.ntt.co.jp>
	<CADjCDK9v4LK+8HhtjFeF4D1q5W=OgCPwA6S2oP47nCVM4zafkQ@mail.gmail.com>

Hello.

On 2018/06/18 22:58, Mahadevan Ramachandran wrote:
> On Mon, Jun 18, 2018 at 3:51 PM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.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





view thread (16+ messages)  latest in thread

Message-ID: <d6575c06-9bf0-10e8-5dae-9a8dd1c6a0cb@lab.ntt.co.jp>
Permalink:  ../d6575c06-9bf0-10e8-5dae-9a8dd1c6a0cb@lab.ntt.co.jp/
Also on:    postgresql.org/message-id/d6575c06-9bf0-10e8-5dae-9a8dd1c6a0cb@lab.ntt.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Langote_Amit_f8@lab.ntt.co.jp, mahadevan@rapidloop.com, david.rowley@2ndquadrant.com, michael@paquier.xyz, david.g.johnston@gmail.com
  Subject: Re: BUG #15245: pg_stat_all_tables does not include partition master tables
  In-Reply-To: <d6575c06-9bf0-10e8-5dae-9a8dd1c6a0cb@lab.ntt.co.jp>
  References: <152922564661.24801.3078728743990100425@wrigleys.postgresql.org> <20180617120653.GD1411@paquier.xyz> <CADjCDK9APQLYPt4F2TH5xSEEYjFCe7nLphEe7L7EHV7-WuAB_A@mail.gmail.com> <CAKFQuwaV0Zz5_e7CmJoP_ULRsZ-G2y6fmMF-4QZP6eGso3J7Dg@mail.gmail.com> <20180618020642.GC3721@paquier.xyz> <16ac0ae3-f0ba-536f-92e2-4a954dce8bbf@lab.ntt.co.jp> <CAKJS1f98mP75ki_gbOfXffhC4FsEtURgVunO8Z0eZN-5m5ji-A@mail.gmail.com> <a44eb853-fda3-29f5-9b4d-1cc65b1485ab@lab.ntt.co.jp> <CADjCDK9v4LK+8HhtjFeF4D1q5W=OgCPwA6S2oP47nCVM4zafkQ@mail.gmail.com> <d6575c06-9bf0-10e8-5dae-9a8dd1c6a0cb@lab.ntt.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox