Re: TransactionIdIsInProgress() cache

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: TransactionIdIsInProgress() cache
Дата
Msg-id 2e78013d0803110618x4dbbc67fg5f7863f027ce6cf4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: TransactionIdIsInProgress() cache  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-patches
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

В списке pgsql-patches по дате отправления:

Предыдущее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit