Re: Latch implementation that wakes on postmaster death on both win32 and Unix

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Latch implementation that wakes on postmaster death on both win32 and Unix
Дата
Msg-id CAEYLb_U-34JfnvYg9UWx-PJiwQ+Pjf6q6TnN8iz+B5qr-Vn_ig@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Latch implementation that wakes on postmaster death on both win32 and Unix  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Latch implementation that wakes on postmaster death on both win32 and Unix
Список pgsql-hackers
On 7 July 2011 19:15, Robert Haas <robertmhaas@gmail.com> wrote:
>> I'm not concerned about the possibility of spurious extra cycles of
>> auxiliary process event loops - should I be?
>
> A tight loop would be bad, but an occasional spurious wake-up seems harmless.

We should also assert !PostmasterIsAlive() from within the latch code
after waking due to apparent Postmaster death. The reason that I don't
want to follow Florian's suggestion to check it in production is that
I don't know what to do if the postmaster turns out to be alive. Why
is it more reasonable to try again than to just return? If the
spurious wake-up thing was a problem that we could actually reproduce,
then maybe I'd have an opinion on it. As it stands, our entire basis
for thinking this may be a problem is the sentence "There may be other
circumstances in which a file descriptor is spuriously reported as
ready". That seems rather flimsy.

Anyone that still has any misgivings about this will probably feel
better once the assertion is never reported to fail on any of the
diverse systems that PostgreSQL will be tested on in advance of the
9.2 release.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: make_greater_string() does not return a string in some cases
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: spinlock contention