| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | 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-23 21:57:52 |
| Message-ID: | awSzghyAGp26Q9WC@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On 2026-Nov-23, PG Bug reporting form wrote:
> contrary to `vacuum` and `cluster`, `repack (concurrently)` is not
> whitelisted in `psql` to allow to run it without starting a transaction when
> autocommit is off.
>
> It looks like there's a white-list of commands in `bin/psql/common.c` in
> `command_no_begin()` and it's missing the `repack (concurrently)` case.
Oh my, I completely forgot about this. I suppose we need to find the
option list, see if either CONCURRENTLY or ANALYZE are in there, and
treat as a command that requires no BEGIN. It should be something like
this, I guess, but there's a problem in that this code may need to deal
with multibyte chars that might confuse the strchr() calls there.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"Oh, great altar of passive entertainment, bestow upon me thy discordant images
at such speed as to render linear thought impossible" (Calvin a la TV)
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-fix-psql-autocommit-off-for-repack-concurrently.patch | text/x-diff | 1.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-11-23 22:16:37 | Re: Timing issue in pg_basebackup |
| Previous Message | PG Bug reporting form | 2026-11-23 21:00:01 | BUG #19934: pg_upgrade can't handle "interesting" user-defined system relation |