View Single Post

   
  #3 (permalink)  
Old 04-19-2008, 07:26 AM
Pavan Deolasee
 
Posts: n/a
Default Re: TransactionIdIsInProgress() cache

On Tue, Mar 11, 2008 at 6:37 PM, Alvaro Herrera
<alvherre@commandprompt.com> 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

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

Reply With Quote