Hi Hannu,

On Thu, Oct 29, 2026 at 11:15 PM Hannu Krosing <[email protected]>
wrote:
> (a) R/W ExpandedRecord fast path into non-atomic DO / PROCEDURE:
...
> Output:
>     NOTICE:  before: zstd_dict
>     ERROR:   compression dictionary 16592 does not exist

Reproduced on v12, also in a PROCEDURE, and without DROP TABLE when
another session trains a second dictionary and runs VACUUM FULL or
REPACK. My procedure test read the column into a text variable, which
is detoasted on assignment, so it never took this path. The script
fails as is only on a UTF8 database: on SQL_ASCII, length() does not
detoast, so a regression test should use something that reads the
value.

Greg, Muzzammil Sarwar's v1 for that fast path [1] closes this on
v12 too: v12 marks inline dict datums with ER_FLAG_HAVE_EXTERNAL,
which is what it checks, and all the cases above then pass. So 0004
may not need its own change here.

> (b) Indirect TOAST pointers in detoast_external_attr() (detoast.c):
...
> (c) SPI_datumTransfer() / datumTransfer():

Both reproduce, from C only: a test function that wraps the raw datum
in an indirect pointer fails in a DO variable and in a WITH HOLD
cursor, and a C procedure fails after SPI_commit(). In core, only
PL/pgSQL calls SPI_datumTransfer().

I will run these on v13.

[1] 
https://www.postgresql.org/message-id/CABUcsRRuMHXWqgiZ5wy=4opbet0nifqevy_d8vofeumtxjb...@mail.gmail.com

Manu


Reply via email to