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.

-- 
Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

Reply via email to