Don't use static storage for SaveTransactionCharacteristics().
Tom Lane <tgl@sss.pgh.pa.us>
Don't use static storage for SaveTransactionCharacteristics(). This is pretty queasy-making on general principles, and the more so once you notice that CommitTransactionCommand() is actually stomping on the values saved by _SPI_commit(). It's okay as long as the active values didn't change during HoldPinnedPortals(); but that's a larger assumption than I think we want to make, especially since the fix is so simple. Discussion: https://postgr.es/m/1533956.1645731245@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xact.c | modified | +14 −18 |
| src/backend/executor/spi.c | modified | +8 −8 |
| src/include/access/xact.h | modified | +10 −2 |
Discussion
- fix crash with Python 3.11 18 messages · 2021-12-22 → 2022-07-18