On Wed, 14 Sep 2022 at 13:52, Tom Lane <t...@sss.pgh.pa.us> wrote: > Japin Li <japi...@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.