From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix psql's non-autocommit mode for REPACK
Date: Wed, 25 Nov 2026 09:34:34 +0000
Message-ID: <E1xW9Oc-00000000FLc-0wQr@gemulon.postgresql.org> (raw)
Fix psql's non-autocommit mode for REPACK
Prevent psql from starting a new transaction before a REPACK command,
because that makes it fail to run if the options CONCURRENTLY or ANALYZE
are given with a complaint that it cannot run in a transaction block.
This is slighly excessive: it would be okay to send BEGIN before a
REPACK without those options. That requires more command parsing than
we're willing to do in psql, so punt. As a workaround for a user that
wants to be able to abort a transaction that starts with a
non-concurrent REPACK, they can send an explicit BEGIN instead.
Reported-by: Philip Hofstetter <phofstetter@sensational.ch>
Bug: #19932
Backpatch-through: 19
Discussion: https://postgr.es/m/19932-b395d1cee4127098@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/14644e123839e5fe2d63797c9c0d16626ff9c420
Modified Files
--------------
src/bin/psql/common.c | 2 ++
1 file changed, 2 insertions(+)
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@kurilemu.de
Subject: Re: pgsql: Fix psql's non-autocommit mode for REPACK
In-Reply-To: <E1xW9Oc-00000000FLc-0wQr@gemulon.postgresql.org>
References: <E1xW9Oc-00000000FLc-0wQr@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