From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif |
Date: | 2012-05-10 21:31:03 |
Message-ID: | 26873.1336685463@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Peter Geoghegan <peter(at)2ndquadrant(dot)com> writes:
> On 10 May 2012 19:35, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-05-10 22:03:06 | pgsql: Tweak documentation wording to avoid "pdfendlink" failure. |
Previous Message | Tom Lane | 2012-05-10 21:26:46 | pgsql: Temporarily revert stats collector latch changes so we can ship |