Re: bug in fast-path locking

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: bug in fast-path locking
Дата
Msg-id 1334013132.5289.86.camel@sussancws0025
обсуждение исходный текст
Ответ на Re: bug in fast-path locking  (Jim Nasby <jim@nasby.net>)
Ответы Re: bug in fast-path locking  (Jim Nasby <jim@nasby.net>)
Список pgsql-hackers
On Mon, 2012-04-09 at 17:42 -0500, Jim Nasby wrote:
> Dumb question... should operations in the various StrongLock functions
> take place in a critical section? Or is that already ensure outside of
> these functions?

Do you mean CRITICAL_SECTION() in the postgres sense (that is, avoid
error paths by making all ERRORs into PANICs and preventing interrupts);
or the sense described here:
http://en.wikipedia.org/wiki/Critical_section ?

If you mean in the postgres sense, you'd have to hold the critical
section open from the time you incremented the strong lock count all the
way until you decremented it (which is normally at the time the lock is
released); which is a cure worse than the disease.

Regards,Jeff Davis




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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: bug in fast-path locking
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Last gasp