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

From Japin Li
Subject Re: A question about StartSubTransaction
Date
Msg-id MEYP282MB1669D1863009558F70EED735B6469@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: A question about StartSubTransaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 14 Sep 2022 at 13:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Japin Li <japinli@hotmail.com> writes:
>> 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.
>

Thanks for the explanation!  Maybe more comments here is better.

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A question about StartSubTransaction
Next
From: Amit Kapila
Date:
Subject: Re: A question about wording in messages