Re: Buffer access rules, and a probable bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Buffer access rules, and a probable bug
Дата
Msg-id 8841.994797519@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Buffer access rules, and a probable bug  (Bill Studenmund <wrstuden@zembu.com>)
Список pgsql-hackers
Bill Studenmund <wrstuden@zembu.com> writes:
> One problem though is that if you don't have a spin lock around the flag,
> you can end up clearing it inadvertenty. i.e. two backends go to update
> (different) bit flags. They each load the current value, and each set the
> (different) bit they want to set. They then store the new value they each
> have come up with. The second store will effectively clear the bit set in
> the first store.

Yes, this is the scenario we're talking about.  The point is that losing
the bit is harmless, in this particular situation, because it will be
set again the next time the tuple is visited.  It's only a hint.  That
being the case, we judge that avoiding the necessity for an exclusive
lock during read is well worth a (very infrequent) need to do an extra
pg_log lookup due to loss of a hint bit.
        regards, tom lane


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

Предыдущее
От: Vince Vielhaber
Дата:
Сообщение: Re: grant and SQL92
Следующее
От: Michel Soto
Дата:
Сообщение: Strange query execution time