From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert analyze support for partitioned tables
Date: Mon, 16 Aug 2021 21:31:34 +0000
Message-ID: <E1mFkCk-0001UJ-Dz@gemulon.postgresql.org> (raw)
Revert analyze support for partitioned tables
This reverts the following commits:
1b5617eb844cd2470a334c1d2eec66cf9b39c41a Describe (auto-)analyze behavior for partitioned tables
0e69f705cc1a3df273b38c9883fb5765991e04fe Set pg_class.reltuples for partitioned tables
41badeaba8beee7648ebe7923a41c04f1f3cb302 Document ANALYZE storage parameters for partitioned tables
0827e8af70f4653ba17ed773f123a60eadd9f9c9 autovacuum: handle analyze for partitioned tables
There are efficiency issues in this code when handling databases with
large numbers of partitions, and it doesn't look like there isn't any
trivial way to handle those. There are some other issues as well. It's
now too late in the cycle for nontrivial fixes, so we'll have to let
Postgres 14 users continue to manually deal with ANALYZE their
partitioned tables, and hopefully we can fix the issues for Postgres 15.
I kept [most of] be280cdad298 ("Don't reset relhasindex for partitioned
tables on ANALYZE") because while we added it due to 0827e8af70f4, it is
a good bugfix in its own right, since it affects manual analyze as well
as autovacuum-induced analyze, and there's no reason to revert it.
I retained the addition of relkind 'p' to tables included by
pg_stat_user_tables, because reverting that would require a catversion
bump.
Also, in pg14 only, I keep a struct member that was added to
PgStat_TabStatEntry to avoid breaking compatibility with existing stat
files.
Backpatch to 14.
Discussion: https://postgr.es/m/20210722205458.f2bug3z6qzxzpx2s@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6f8127b7390119c21479f5ce495b7d2168930e82
Modified Files
--------------
doc/src/sgml/maintenance.sgml | 6 --
doc/src/sgml/perform.sgml | 3 +-
doc/src/sgml/ref/analyze.sgml | 40 ++++--------
doc/src/sgml/ref/create_table.sgml | 8 +--
doc/src/sgml/ref/pg_restore.sgml | 6 +-
src/backend/access/common/reloptions.c | 15 ++---
src/backend/commands/analyze.c | 50 ++++-----------
src/backend/commands/tablecmds.c | 47 +-------------
src/backend/postmaster/autovacuum.c | 66 +++-----------------
src/backend/postmaster/pgstat.c | 108 +++------------------------------
src/include/pgstat.h | 27 +--------
11 files changed, 56 insertions(+), 320 deletions(-)
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-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Revert analyze support for partitioned tables
In-Reply-To: <E1mFkCk-0001UJ-Dz@gemulon.postgresql.org>
References: <E1mFkCk-0001UJ-Dz@gemulon.postgresql.org>
* 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