Re: Why there are TRANS_START and TRANS_INPROGRESS - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Why there are TRANS_START and TRANS_INPROGRESS
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17C5055A@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Why there are TRANS_START and TRANS_INPROGRESS  (DT <kurt023@hotmail.com>)
List 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

pgsql-general by date:

Previous
From: DT
Date:
Subject: Why there are TRANS_START and TRANS_INPROGRESS
Next
From: Robert James
Date:
Subject: Re: Count of records in a row