Japin Li <japi...@hotmail.com> writes: > IIRC, AtSubStart_Memory, AtSubStart_ResourceOwner and > AfterTriggerBeginSubXact don't > use s->state.
No, they don't. > Why should we set s->state to TRANS_START and then TRANS_INPROGRESS? I believe it's so that if an error gets thrown somewhere in that area, we'll recover properly. I'd be the first to say that this stuff isn't terribly well-tested, since it's hard to force an error there. regards, tom lane