Re: Why there are TRANS_START and TRANS_INPROGRESS

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Why there are TRANS_START and TRANS_INPROGRESS
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17C5055A@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Why there are TRANS_START and TRANS_INPROGRESS  (DT <kurt023@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: DT
Дата:
Сообщение: Why there are TRANS_START and TRANS_INPROGRESS
Следующее
От: Robert James
Дата:
Сообщение: Re: Count of records in a row