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 <[email protected]>
Bug: #19932
Backpatch-through: 19
Discussion: https://postgr.es/m/[email protected]

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4096427734b30cb98ce00a969f8050064dffcd60

Modified Files
--------------
src/bin/psql/common.c | 2 ++
1 file changed, 2 insertions(+)

Reply via email to