Re: relkind='p' has no pg_stat_user_tables

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: relkind='p' has no pg_stat_user_tables
Дата
Msg-id 20180504141333.GF1592@paquier.xyz
обсуждение исходный текст
Ответ на Re: relkind='p' has no pg_stat_user_tables  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-general
On Thu, May 03, 2018 at 01:24:59PM -0500, Justin Pryzby wrote:
> Yes, I was surprised about the difference between ANALYZE relkind_p
> and relkind_r.
>
> But I see that's a documented behavior I'd missed until now:
>
> https://www.postgresql.org/docs/current/static/sql-analyze.html
> |If the specified table is a partitioned table, both the inheritance statistics
> |of the partitioned table as a whole and statistics of the individual partitions
> |are updated.

When I read this thread, it seems to me that more user-friendly system
functions able to extract a sub-tree of child relations (by inheritance
and/or partition) is something which would help.  Now users are limited
to things like large WITH RECURSIVE queries when willing to extract a
full tree.  While that's easily done with a custom function, there is
room for an in-core function as well.  I recall that Amit Langote has
sent a patch which introduces a wrapper function on top of
find_all_inheritors, perhaps that would get into v12.
--
Michael

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Query planner riddle (array-related?)
Следующее
От: nikhil raj
Дата:
Сообщение: Re: How to find the hits on the databases and tables in Postgres