agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: pgsql-hackers@postgresql.org
Cc: alvherre@kurilemu.de
Subject: Re: REPACK (ANALYZE) within transaction block segfaults
Date: Thu, 27 Aug 2026 14:39:35 -0500
Message-ID: <apCSd2NvvEJfBmVu@nathan> (raw)
In-Reply-To: <CAHGQGwEqN80ka_PY__DiPCu+S=h_7KgujnMEU38OU9C1zsGQpA@mail.gmail.com>
References: <apBCEl4hBHlq0axm@nathan>
	<CAHGQGwEqN80ka_PY__DiPCu+S=h_7KgujnMEU38OU9C1zsGQpA@mail.gmail.com>

On Fri, Aug 28, 2026 at 01:09:59AM +0900, Fujii Masao wrote:
> On Thu, Aug 27, 2026 at 10:56 PM Nathan Bossart
> <nathandbossart@gmail.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.

Hm.  Couldn't we do something like the in_outer_xact/use_own_xacts stuff in
vacuum() to get it working instead?

-- 
nathan






view thread (25+ messages)  latest in thread

Message-ID: <apCSd2NvvEJfBmVu@nathan>
Permalink:  ../apCSd2NvvEJfBmVu@nathan/
Also on:    postgresql.org/message-id/apCSd2NvvEJfBmVu@nathan

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, masao.fujii@gmail.com, alvherre@kurilemu.de
  Subject: Re: REPACK (ANALYZE) within transaction block segfaults
  In-Reply-To: <apCSd2NvvEJfBmVu@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox