From: Justin Pryzby <pryzby@telsasoft.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Zhihong Yu <zyu@yugabyte.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables
Date: Thu, 22 Apr 2021 12:43:46 -0500
Message-ID: <20210422174346.GE7256@telsasoft.com> (raw)
In-Reply-To: <20210421230649.GA19244@alvherre.pgsql>
References: <CA+TgmoaVOx7K0BE8xpR=_FwLGEP1kJoSx+oskCsVGmuJq5h4vw@mail.gmail.com>
<20210421230649.GA19244@alvherre.pgsql>
On Wed, Apr 21, 2021 at 07:06:49PM -0400, Alvaro Herrera wrote:
> On 2021-Apr-09, Robert Haas wrote:
> > Does this need to worry about new partitions getting attached to a
> > partitioned table, or old ones getting detached? (Maybe it does
> > already, not sure.)
>
> I was pinged because this is listed as an open item. I don't think it
> is one. Handling ATTACH/DETACH/DROP is important for overall
> consistency, of course, so we should do it eventually, but the fact that
> autovacuum runs analyze *at all* for partitioned tables is an enormous
> step forward from it not doing so. I think we should treat ATTACH/
> DETACH/DROP handling as a further feature to be added in a future
> release, not an open item to be fixed in the current one.
I think this is okay, with the caveat that we'd be changing the behavior
(again) in a future release, rather than doing it all in v14.
Maybe the behavior should be documented, though. Actually, I thought the
pre-existing (non)behavior of autoanalyze would've been documented, and we'd
now update that. All I can find is this:
https://www.postgresql.org/docs/current/sql-analyze.html
|The autovacuum daemon, however, will only consider inserts or updates on the
|parent table itself when deciding whether to trigger an automatic analyze for
|that table
I think that should probably have been written down somewhere other than for
the manual ANALYZE command, but in any case it seems to be outdated now.
--
Justin
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: pryzby@telsasoft.com, alvherre@alvh.no-ip.org, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, zyu@yugabyte.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables
In-Reply-To: <20210422174346.GE7256@telsasoft.com>
* 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