Re: fix crash with Python 3.11

Markus Wanner <markus.wanner@enterprisedb.com>

From: Markus Wanner <markus.wanner@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: exclusion@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2022-06-23T07:41:00Z
Lists: pgsql-hackers

Attachments

On 6/21/22 18:33, Tom Lane wrote:
> My inclination at this point is to not back-patch the second change
> 12d768e70 ("Don't use static storage for SaveTransactionCharacteristics").
> It's not clear that the benefit would be worth even a small risk of
> somebody being unhappy about the API break.

Actually, the backport of 2e517818f ("Fix SPI's handling of errors") 
already broke the API for code using SPICleanup, as that function had 
been removed. Granted, it's not documented, but still exported.

I propose to re-introduce a no-op placeholder similar to what we have 
for SPI_start_transaction, somewhat like the attached patch.

Regards

Markus

Commits

  1. Re-add SPICleanup for ABI compatibility in stable branch

  2. Fix SPI's handling of errors during transaction commit.

  3. Don't use static storage for SaveTransactionCharacteristics().