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