pgsql: Don't use static storage for SaveTransactionCharacteristics().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't use static storage for SaveTransactionCharacteristics().
Date: 2022-02-28 17:54:18
Message-ID: E1nOkDy-000Jom-A8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/12d768e70497afc5a57acf73c251316997b5175a

Modified Files
--------------
src/backend/access/transam/xact.c | 32 ++++++++++++++------------------
src/backend/executor/spi.c | 16 ++++++++--------
src/include/access/xact.h | 12 ++++++++++--
3 files changed, 32 insertions(+), 28 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-02-28 19:12:58 pgsql: Allow root-owned SSL private keys in libpq, not only the backend
Previous Message Tom Lane 2022-02-28 17:45:46 pgsql: Fix SPI's handling of errors during transaction commit.