From: Michael Paquier <michael@paquier.xyz>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-general@postgresql.org
Subject: Re: relkind='p' has no pg_stat_user_tables
Date: Fri, 4 May 2018 23:13:33 +0900
Message-ID: <20180504141333.GF1592@paquier.xyz> (raw)
In-Reply-To: <20180503182459.GI9585@telsasoft.com>
References: <20180503162047.37k7km4dx62i6l4d@alvherre.pgsql>
<0d1a3f8a-f6f9-4712-6b6c-174e64a38b48@aklaver.com>
<20180503173855.GH9585@telsasoft.com>
<ba5ad25e-0585-aff7-3423-ec76f1f8ffb5@aklaver.com>
<20180503182459.GI9585@telsasoft.com>
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
Attachments:
signature.asc (application/pgp-signature, 832B) download
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-general@postgresql.org
Cc: michael@paquier.xyz, pryzby@telsasoft.com, adrian.klaver@aklaver.com, alvherre@2ndquadrant.com
Subject: Re: relkind='p' has no pg_stat_user_tables
In-Reply-To: <20180504141333.GF1592@paquier.xyz>
References: <20180503162047.37k7km4dx62i6l4d@alvherre.pgsql> <0d1a3f8a-f6f9-4712-6b6c-174e64a38b48@aklaver.com> <20180503173855.GH9585@telsasoft.com> <ba5ad25e-0585-aff7-3423-ec76f1f8ffb5@aklaver.com> <20180503182459.GI9585@telsasoft.com> <20180504141333.GF1592@paquier.xyz>
* 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