Re: Why there are TRANS_START and TRANS_INPROGRESS

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "DT *EXTERN*" <kurt023(at)hotmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Why there are TRANS_START and TRANS_INPROGRESS
Date: 2013-10-22 11:22:47
Message-ID: A737B7A37273E048B164557ADEF4A58B17C5055A@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

DT wrote:
> I'm reading code of xact.c, and I found the only difference between TRANS_START
> and TRANS_INPROGRESS is when transaction aborts in TRANS_START status we set
> status to TRANS_INPROGRESS so AbortTransaction() will not report WARNING.
> So I wonder to know the reason why we distinguish them?

After reading into it it seems to me that TRANS_START means
"transaction is starting" and TRANS_INPROGRESS means
"transaction successfully started". See StartTransaction()
and StartSubTransaction().

A difference is made in IsTransactionState() where
TRANS_START transactions are not reported as being in a
transaction.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert James 2013-10-22 13:06:47 Re: Count of records in a row
Previous Message DT 2013-10-22 10:44:31 Why there are TRANS_START and TRANS_INPROGRESS