Re: Process local hint bit cache

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Process local hint bit cache
Дата
Msg-id 29136.1301773223@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Process local hint bit cache  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Process local hint bit cache  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> On Wed, Mar 30, 2011 at 2:35 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
>> btw I haven't forgotten your idea to move TransactionIdInProgress
>> Down. I think this is a good idea, and will experiment with it pre and
>> post cache.

The reason it's done in that order is to avoid race conditions.  If you
change the order you will get wrong behavior if the other transaction
ends between the TransactionIdDidCommit and the TransactionIdInProgress
tests.  I suppose you could recheck TransactionIdDidCommit a second
time, but that hardly seems likely to result in performance gains.

> aside:
> Moving TransactionIdInProgress below TransactionIdDidCommit can help
> in once sense: TransactionIdDidCommit grabs the XidStatus but discards
> the knowledge if the transaction is known aborted.

Doesn't the single-entry cache help with that?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 9.0.3 SIGFAULT on FreeBSD with dtrace
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Another swing at JSON