Re: REPACK (ANALYZE) within transaction block segfaults

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Antonin Houska <ah(at)cybertec(dot)at>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, alvherre(at)kurilemu(dot)de
Subject: Re: REPACK (ANALYZE) within transaction block segfaults
Date: 2026-08-28 19:52:09
Message-ID: apHm6bHknXuEyElx@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 28, 2026 at 09:15:25PM +0200, Antonin Houska wrote:
> I think there are just two different concepts (for historical reasons?):
> vacuum_rel() expects no active transaction on entry, while cluster_rel()
> handles transaction boundaries on its own.
>
> Since REPACK (ANALYZE) is effectively VACUUM (FULL, ANALYZE), I'd prefer the
> same behavior, i.e. prohibiting execution both in a transaction block and in a
> function:

This is probably the way to go for v19. As you note, the analogous VACUUM
command has long ERROR'd, and we could always look into removing this
restriction in the future. I'd rather do it that way than ship an
incorrect fix in v19 that will be tougher to back out.

--
nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-08-28 19:58:18 Should the WAIT FOR command tag be "WAIT" or "WAIT FOR"?
Previous Message Andrew Dunstan 2026-08-28 19:43:22 Re: Allow table AMs to define their own reloptions