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.


Reply via email to