From: | Japin Li <japinli(at)hotmail(dot)com> |
---|---|
To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | A question about StartSubTransaction |
Date: | 2022-09-14 05:41:24 |
Message-ID: | MEYP282MB1669506A5ED2DD276F3121B0B6469@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
I found the StartSubTransaction has the following code:
static void
StartSubTransaction(void)
{
[...]
s->state = TRANS_START;
/*
* Initialize subsystems for new subtransaction
*
* must initialize resource-management stuff first
*/
AtSubStart_Memory();
AtSubStart_ResourceOwner();
AfterTriggerBeginSubXact();
s->state = TRANS_INPROGRESS;
[...]
}
IIRC, AtSubStart_Memory, AtSubStart_ResourceOwner and AfterTriggerBeginSubXact don't
use s->state. Why should we set s->state to TRANS_START and then TRANS_INPROGRESS?
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-09-14 05:52:50 | Re: A question about StartSubTransaction |
Previous Message | John Naylor | 2022-09-14 05:40:43 | Re: minimum perl version |