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

Поиск
Список
Период
Сортировка
От Mahadevan Ramachandran
Тема Re: BUG #15245: pg_stat_all_tables does not include partition master tables
Дата
Msg-id CADjCDK9APQLYPt4F2TH5xSEEYjFCe7nLphEe7L7EHV7-WuAB_A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15245: pg_stat_all_tables does not include partition mastertables  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: BUG #15245: pg_stat_all_tables does not include partition master tables  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
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


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15245: pg_stat_all_tables does not include partition mastertables
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15245: pg_stat_all_tables does not include partition master tables