|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>|
|Subject:||Re: fix crash with Python 3.11|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
> * I'm not satisfied with using static storage for
Looking closer at this, I was not too amused to discover that of the three
existing SaveTransactionCharacteristics calls, two already conflict with
each other: _SPI_commit calls SaveTransactionCharacteristics and then
calls CommitTransactionCommand, which again calls
SaveTransactionCharacteristics, overwriting the static storage.
I *think* there's no live bug there, because the state probably wouldn't
have changed in between; but considering we run arbitrary user-defined
code between those two points I sure wouldn't bet on it.
0001 attached is the same code patch as before, but now with spi.sgml
updates; 0002 changes the API for Save/RestoreTransactionCharacteristics.
If anyone's really worried about backpatching 0002, we could perhaps
get away with doing that only in HEAD.
I found in 0002 that I had to make CommitTransactionCommand call
SaveTransactionCharacteristics unconditionally, else I got warnings
about possibly-uninitialized local variables. It's cheap enough
that I'm not too fussed about that. I don't get any warnings from
the similar code in spi.c, probably because those functions can't
be inlined there.
regards, tom lane
|Next Message||Justin Pryzby||2022-02-24 19:35:20||Re: document that brin's autosummarize parameter is off by default|
|Previous Message||David Christensen||2022-02-24 19:28:30||Re: [PATCH] add relation and block-level filtering to pg_waldump|