Test IsInTransactionChain, not IsTransactionBlock, in vac_update_relstats.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 38cb8687a9dde85b1dad3d347ab420ecdf2259b7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-10-30T17:03:31Z
Releases: 9.2.10
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.

Files