Re: TransactionIdIsInProgress() cache

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TransactionIdIsInProgress() cache
Дата
Msg-id 5338.1205267329@sss.pgh.pa.us
обсуждение исходный текст
Ответ на TransactionIdIsInProgress() cache  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-patches
Simon Riggs <simon@2ndquadrant.com> writes:
> We currently have a single item cache of the last checked TransactionId,
> which optimises the call to TransactionIdDidCommit() during
> HeapTupleSatisfiesMVCC() and partners.

> Before we call TransactionIdDidCommit() we always call
> TransactionIdIsInProgress().

> TransactionIdIsInProgress() doesn't check the single item cache, so even
> if we have just checked for this xid, we will check it again. Since this
> function takes ProcArrayLock and may be called while holding other locks
> it will improve scalability if we can skip the call, for the cost of an
> integer comparison.

> Following patch implements fastpath in TransactionIdIsInProgress() to
> utilise single item cache.

Applied with minor adjustments and some desultory comment-improvement.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: trace_checkpoint parameter patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PERFORM] Very slow (2 tuples/second) sequential scan after bulk insert; speed returns to ~500 tuples/second after commit