Re: pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif
Дата
Msg-id 26873.1336685463@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif  (Peter Geoghegan <peter@2ndquadrant.com>)
Список pgsql-committers
Peter Geoghegan <peter@2ndquadrant.com> writes:
> On 10 May 2012 19:35, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Remove weasel wording about falsely-set result bits from
>> WaitLatch's API contract.

> Aren't those weasel words still applicable to the case where sock !=
> PGINVALID_SOCKET ?

I don't think so.  WaitLatch is honestly reporting the result of select
or poll; code that doesn't work with it wouldn't work with the native
OS facilities either.  The only case that is really a problem here is
where we make the logical leap from "socket possibly readable" to
"postmaster is dead".

I think what that Linux man page is advising is that you not assume that
a blocking-mode read() won't block, which AFAIK is something we don't
do; we always use non-block mode on sockets we don't wish to block on.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Temporarily revert stats collector latch changes so we can ship
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Tweak documentation wording to avoid "pdfendlink" failure.