On 17 June 2018 at 20:54, PG Bug reporting form <noreply@postgresql.org> 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'.
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
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services