Re: BUG #19932: `repack (concurrently)` does not work in `psql` with `AUTOCOMMIT` set to `off`

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Philip Hofstetter <phofstetter(at)sensational(dot)ch>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19932: `repack (concurrently)` does not work in `psql` with `AUTOCOMMIT` set to `off`
Date: 2026-11-25 09:43:15
Message-ID: awah4KHe8lDGiys9@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2026-Nov-24, Tom Lane wrote:

> Could we get away with whitelisting all variants of REPACK,
> rather than expecting psql to know which ones can't be executed
> in a transaction? That seems like a recipe for future bugs of
> omission, quite aside from parsing difficulties.

Oh, that idea hadn't occurred to me. I suppose the downside is not very
bad: if you're in non-autocommit mode, and run any REPACK without a
previous command, then that repack will run in a separately committed
transaction, instead of the transaction being left open for the next
command. If you really wanted to run a REPACK in a transaction, you can
work around this by doing a manual BEGIN beforehand.

Pushed that way.

Thanks for reporting this,

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
#error "Operator lives in the wrong universe"
("Use of cookies in real-time system development", M. Gleixner, M. Mc Guire)

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Álvaro Herrera 2026-11-25 09:45:43 Re: vacuumlo can delete large objects referenced only by FORCE RLS-hidden rows
Previous Message Xuneng Zhou 2026-11-25 09:13:57 Re: Lost walsender wakeup stalls synchronous commits until the standby's next reply (16+)