Re: A question about StartSubTransaction - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A question about StartSubTransaction
Date
Msg-id 2535808.1663134770@sss.pgh.pa.us
Whole thread Raw
In response to A question about StartSubTransaction  (Japin Li <japinli@hotmail.com>)
Responses Re: A question about StartSubTransaction
List pgsql-hackers
Japin Li <japinli@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



pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: A question about StartSubTransaction
Next
From: Japin Li
Date:
Subject: Re: A question about StartSubTransaction