| From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
|---|---|
| To: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
| Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org |
| Subject: | Re: TransactionIdIsInProgress() cache |
| Date: | 2008-03-11 13:07:48 |
| Message-ID: | 20080311130748.GE6767@alvh.no-ip.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavan Deolasee | 2008-03-11 13:18:14 | Re: TransactionIdIsInProgress() cache |
| Previous Message | Pavan Deolasee | 2008-03-11 13:06:33 | Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit |