Re: pgsql: autovacuum: handle analyze for partitioned tables

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Zhihong Yu <zyu@yugabyte.com>, pgsql-hackers@lists.postgresql.org
Date: 2021-04-23T18:01:52Z
Lists: pgsql-hackers
On Thu, Apr 22, 2021 at 12:43:46PM -0500, Justin Pryzby wrote:
> 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.

Starting with this 

Commits

  1. Describe (auto-)analyze behavior for partitioned tables

  2. Add comment about extract_autovac_opts not holding lock

  3. Set pg_class.reltuples for partitioned tables

  4. autovacuum: handle analyze for partitioned tables