From: Mahadevan Ramachandran <mahadevan@rapidloop.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15245: pg_stat_all_tables does not include partition master tables
Date: Sun, 17 Jun 2018 17:54:03 +0530
Message-ID: <CADjCDK9APQLYPt4F2TH5xSEEYjFCe7nLphEe7L7EHV7-WuAB_A@mail.gmail.com> (raw)
In-Reply-To: <20180617120653.GD1411@paquier.xyz>
References: <152922564661.24801.3078728743990100425@wrigleys.postgresql.org>
<20180617120653.GD1411@paquier.xyz>
Well, to the user it looks like a table because he created it
using a CREATE TABLE command and he can use it like
a normal table.
The view is named "_all_tables" so he'd expect, well, all
the tables to be listed there.
Doesn't it seem logical?
-Mahadevan
On Sun, Jun 17, 2018 at 5:36 PM, Michael Paquier <michael@paquier.xyz> wrote:
> On Sun, Jun 17, 2018 at 08:54:06AM +0000, PG Bug reporting form wrote:
>> The system view pg_catalog.pg_stat_all_tables (and therefore also
>> pg_catalog.pg_stat_user_tables) do not list partition master tables (CREATE
>> TABLE ... PARTITION BY ..).
>>
>> This is because it only includes rows from pg_class with relkind IN ('r',
>> 't', 'm') (as defined in src/backend/catalog/system_views.sql).
>>
>> IMHO, it should also include rows with relkind = 'p'.
>
> Why? A parent partition has no physical presence and no data of its
> own.
> --
> Michael
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: mahadevan@rapidloop.com, michael@paquier.xyz
Subject: Re: BUG #15245: pg_stat_all_tables does not include partition master tables
In-Reply-To: <CADjCDK9APQLYPt4F2TH5xSEEYjFCe7nLphEe7L7EHV7-WuAB_A@mail.gmail.com>
References: <152922564661.24801.3078728743990100425@wrigleys.postgresql.org> <20180617120653.GD1411@paquier.xyz> <CADjCDK9APQLYPt4F2TH5xSEEYjFCe7nLphEe7L7EHV7-WuAB_A@mail.gmail.com>
* 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