Re: TransactionIdIsInProgress() cache - Mailing list pgsql-patches

From Pavan Deolasee
Subject Re: TransactionIdIsInProgress() cache
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: TransactionIdIsInProgress() cache  (Alvaro Herrera <[email protected]>)
List pgsql-patches
On Tue, Mar 11, 2008 at 6:37 PM, Alvaro Herrera
<[email protected]> wrote:
> I didn't check whether your transformation is correct, but if so then it
>  can be changed like this and save the extra XidDidCommit call:
>
>     xvac_committed = TransactionIdDidCommit(xvac);
>     if (xvac_committed)
>
>     {
>         /* committed */
>     }
>     else if (!TransactionIdIsInProgress(xvac))
>     {
>        if (xvac_committed)
>
>        {
>           /* committed */
>        }
>        else
>        {
>           /* aborted */
>        }
>     }
>     else
>     {
>         /* in-progress */
>     }
>


I doubt if the transformation is correct. If xvac_committed is true, why would
one even get into the else part ?

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: "Pavan Deolasee"
Date:
Subject: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit
Next
From: Alvaro Herrera
Date:
Subject: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit