pgsql: Reject REPACK (ANALYZE) in a transaction block

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Reject REPACK (ANALYZE) in a transaction block
Date: 2026-09-08 12:07:54
Message-ID: E1x3ucD-00000003zKI-0p4y@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Reject REPACK (ANALYZE) in a transaction block

The current implementation doesn't support it correctly, leading to
mysterious warnings and some worse problems. Have the combination throw
an error.

This is intended as a temporary stopgap until we can implement it in a
future release, as it's a useful feature.

Author: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Author: Antonin Houska <ah(at)cybertec(dot)at>
Author: Osama Abdul Qader <osamaabdulqader(dot)cs(at)gmail(dot)com>
Reported-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Backpatch-through: 19
Discussion: https://postgr.es/m/apBCEl4hBHlq0axm@nathan

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/24dd8c369e5656a9c38f5494c9c57c38705ce62f

Modified Files
--------------
doc/src/sgml/ref/repack.sgml | 2 ++
src/backend/commands/repack.c | 13 ++++++++++++-
src/test/regress/expected/cluster.out | 17 ++++++++++++++++-
src/test/regress/sql/cluster.sql | 17 ++++++++++++++++-
4 files changed, 46 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2026-09-08 13:31:26 pgsql: Don't evaluate the FOR PORTION OF target under EXPLAIN
Previous Message Alexander Korotkov 2026-09-08 11:09:29 pgsql: Revert "Mark modified the FSM buffer as dirty during recovery"