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

From Alvaro Herrera
Subject Re: TransactionIdIsInProgress() cache
Date
Msg-id 20080311130748.GE6767@alvh.no-ip.org
Whole thread Raw
In response to Re: TransactionIdIsInProgress() cache  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: TransactionIdIsInProgress() cache  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Re: TransactionIdIsInProgress() cache  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-patches
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 */
    }


--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-patches by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: Bulk Insert tuning
Next
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