Re: How long does commit take?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How long does commit take?
Дата
Msg-id 28887.1177632263@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How long does commit take?  ("Phillip Smith" <phillip.smith@weatherbeeta.com.au>)
Список pgsql-novice
"Phillip Smith" <phillip.smith@weatherbeeta.com.au> writes:
> I'd believe that those few milliseconds occur before the database returns to
> the client that the COMMIT completed successfully. It is available
> immediately as soon at the COMMIT command is COMPLETED to the client, not as
> soon as the COMMIT is STARTED.

Actually, it's available at the instant the XID is removed from the
ProcArray and therefore stops appearing to be IN PROGRESS to other
transactions (not sooner, not later --- we have expended no little
effort to make sure that transaction commit appears atomic to onlooking
processes).  The report to the client that the commit is done will
happen some little while after that; there's some post-commit cleanup
involved, plus message transmission.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: record id
Следующее
От: "stephen"
Дата:
Сообщение: Re: cannot insert or update