pgsql: Test IsInTransactionChain, not IsTransactionBlock, in vac_update - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Test IsInTransactionChain, not IsTransactionBlock, in vac_update
Date
Msg-id E1Xjt95-0003VW-PS@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Test IsInTransactionChain, not IsTransactionBlock, in vac_update_relstats.

As noted by Noah Misch, my initial cut at fixing bug #11638 didn't cover
all cases where ANALYZE might be invoked in an unsafe context.  We need to
test the result of IsInTransactionChain not IsTransactionBlock; which is
notationally a pain because IsInTransactionChain requires an isTopLevel
flag, which would have to be passed down through several levels of callers.
I chose to pass in_outer_xact (ie, the result of IsInTransactionChain)
rather than isTopLevel per se, as that seemed marginally more apropos
for the intermediate functions to know about.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fd0f651a867ce4a25160e37bcb9085f3b3209bf8

Modified Files
--------------
src/backend/commands/analyze.c    |   19 ++++++++++++-------
src/backend/commands/vacuum.c     |   21 ++++++++++++---------
src/backend/commands/vacuumlazy.c |    6 ++++--
src/include/commands/vacuum.h     |    5 +++--
4 files changed, 31 insertions(+), 20 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Test IsInTransactionChain, not IsTransactionBlock, in vac_update
Next
From: Tom Lane
Date:
Subject: pgsql: Test IsInTransactionChain, not IsTransactionBlock, in vac_update