Re: REPACK (ANALYZE) within transaction block segfaults

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, alvherre(at)kurilemu(dot)de
Subject: Re: REPACK (ANALYZE) within transaction block segfaults
Date: 2026-08-27 16:09:59
Message-ID: CAHGQGwEqN80ka_PY__DiPCu+S=h_7KgujnMEU38OU9C1zsGQpA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 27, 2026 at 10:56 PM Nathan Bossart
<nathandbossart(at)gmail(dot)com> wrote:
> Presumably we need to handle transaction blocks a bit like how vacuum()
> does. Or maybe even prevent REPACK (ANALYZE) within a transaction block.

I looked into this a bit. I think the problem is not ordinary
transaction blocks themselves, but non-top-level execution, such as the
DO block in the reproducer.

So the attached patch rejects only non-top-level REPACK (ANALYZE)
commands.

Regards,

--
Fujii Masao

Attachment Content-Type Size
v1-0001-Prevent-REPACK-ANALYZE-from-functions.patch application/octet-stream 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-08-27 16:20:13 Re: Walreceiver create temp slot more than once when timeline switch
Previous Message Nathan Bossart 2026-08-27 16:01:57 Re: CLUSTER progress: wrong index_rebuild_count for tables with TOAST