Re: Autovacuum on partitioned table (autoanalyze) - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Autovacuum on partitioned table (autoanalyze)
Date
Msg-id 20210406235837.qym42yn7lsnxzlir@alap3.anarazel.de
Whole thread Raw
In response to Re: Autovacuum on partitioned table (autoanalyze)  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Autovacuum on partitioned table (autoanalyze)  (yuzuko <yuzukohosoya@gmail.com>)
List pgsql-hackers
Hi,

On 2021-04-06 16:56:49 -0400, Alvaro Herrera wrote:
> I think there is a good reason to treat them the same: pgstat does not
> have a provision to keep stats both of the table with children, and the
> table without children.  It can only have one of those.  For
> partitioning that doesn't matter: since the table-without-children
> doesn't have anything on its own (no scans, no tuples, no nothing) then
> we can just use the entry to store the table-with-children data.  But
> for the inheritance case, the parent can have its own tuples and counts
> its own scans and so on; so if we change things, we'll overwrite the
> stats.  Maybe in the long-term we should allow pgstat to differentiate
> those cases, but that seems not in scope for this patch.

FWIW, I think it shouldn't be too hard to do that once the shared memory
stats patch goes in (not 14, unfortunately). The hardest part will be to
avoid exploding the number of interface functions, but I think we can
figure out a way to deal with that.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Remove page-read callback from XLogReaderState.
Next
From: Andres Freund
Date:
Subject: Re: ModifyTable overheads in generic plans