pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Reject CLUSTER (ANALYZE).
2+ messages / 1 participants
[nested] [flat]
* pgsql: Reject CLUSTER (ANALYZE).
@ 2026-08-13 20:31 Nathan Bossart <nathan@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Bossart @ 2026-08-13 20:31 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Reject CLUSTER (ANALYZE).
The introduction of the REPACK command also added support for
CLUSTER (ANALYZE). Presumably this was unintentional, as the
CLUSTER docs make no mention of it. CLUSTER (ANALYZE) on an
ordinary table succeeds and does indeed analyze the table, but a
database-wide CLUSTER (ANALYZE) or one on a partitioned table
fails with an error like:
ERROR: cannot execute REPACK (ANALYZE) on multiple tables
Rather than improving support for CLUSTER (ANALYZE) and thereby
encouraging folks to use CLUSTER instead of REPACK, let's just
reject it. This commit does so by teaching ExecRepack() to ERROR
for the ANALYZE option in anything except REPACK commands. Note
that VACUUM (FULL, ANALYZE) does not go through ExecRepack() and
therefore is unaffected by this change.
Oversight in commit ac58465e06.
Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://postgr.es/m/CAN4CZFMVcgv1b2G-i%2Bkhs2MDnzWSr7O_53j_x%2BuhAxUV5rwWqw%40mail.gmail.com
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ac5cea86e8a474e13d7dcd22a4a7fabf722c5514
Modified Files
--------------
src/backend/commands/repack.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Reject CLUSTER (ANALYZE).
@ 2026-08-13 20:31 Nathan Bossart <nathan@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Bossart @ 2026-08-13 20:31 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Reject CLUSTER (ANALYZE).
The introduction of the REPACK command also added support for
CLUSTER (ANALYZE). Presumably this was unintentional, as the
CLUSTER docs make no mention of it. CLUSTER (ANALYZE) on an
ordinary table succeeds and does indeed analyze the table, but a
database-wide CLUSTER (ANALYZE) or one on a partitioned table
fails with an error like:
ERROR: cannot execute REPACK (ANALYZE) on multiple tables
Rather than improving support for CLUSTER (ANALYZE) and thereby
encouraging folks to use CLUSTER instead of REPACK, let's just
reject it. This commit does so by teaching ExecRepack() to ERROR
for the ANALYZE option in anything except REPACK commands. Note
that VACUUM (FULL, ANALYZE) does not go through ExecRepack() and
therefore is unaffected by this change.
Oversight in commit ac58465e06.
Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://postgr.es/m/CAN4CZFMVcgv1b2G-i%2Bkhs2MDnzWSr7O_53j_x%2BuhAxUV5rwWqw%40mail.gmail.com
Backpatch-through: 19
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d7db169fa13a7e4db9013816c7a2c498bd304fba
Modified Files
--------------
src/backend/commands/repack.c | 7 +++++++
1 file changed, 7 insertions(+)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-08-13 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-08-13 20:31 pgsql: Reject CLUSTER (ANALYZE). Nathan Bossart <nathan@postgresql.org>
2026-08-13 20:31 pgsql: Reject CLUSTER (ANALYZE). Nathan Bossart <nathan@postgresql.org>
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