-
- Downloads
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.
Showing
- src/backend/commands/analyze.c 12 additions, 7 deletionssrc/backend/commands/analyze.c
- src/backend/commands/vacuum.c 12 additions, 9 deletionssrc/backend/commands/vacuum.c
- src/backend/commands/vacuumlazy.c 4 additions, 2 deletionssrc/backend/commands/vacuumlazy.c
- src/include/commands/vacuum.h 3 additions, 2 deletionssrc/include/commands/vacuum.h
Loading
Please register or sign in to comment