agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Cc: alvherre@kurilemu.de
Subject: REPACK (ANALYZE) within transaction block segfaults
Date: Thu, 27 Aug 2026 08:56:34 -0500
Message-ID: <apBCEl4hBHlq0axm@nathan> (raw)
I didn't see this reported yet:
CREATE TABLE t (a INT PRIMARY KEY, b TEXT);
INSERT INTO t SELECT g, 'v' FROM generate_series(1, 100) g;
DO $$ BEGIN EXECUTE 'REPACK (ANALYZE) t'; END $$;
This produces the following output:
WARNING: transaction left non-empty SPI stack
HINT: Check for missing "SPI_finish" calls.
WARNING: snapshot 0x8ef018100 still active
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
Presumably we need to handle transaction blocks a bit like how vacuum()
does. Or maybe even prevent REPACK (ANALYZE) within a transaction block.
--
nathan
view thread (25+ messages) latest in thread
Message-ID: <apBCEl4hBHlq0axm@nathan>
Permalink: ../apBCEl4hBHlq0axm@nathan/
Also on: postgresql.org/message-id/apBCEl4hBHlq0axm@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, alvherre@kurilemu.de
Subject: Re: REPACK (ANALYZE) within transaction block segfaults
In-Reply-To: <apBCEl4hBHlq0axm@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