Re: Proposal: "Causal reads" mode for load balancing reads without stale data - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Proposal: "Causal reads" mode for load balancing reads without stale data
Date
Msg-id CAEepm=2zFZBYK-vRRi9nRmG3h_e0aCQM1C76bJYUwy_5AFo0Mg@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: "Causal reads" mode for load balancing reads without stale data  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Proposal: "Causal reads" mode for load balancing reads without stale data  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Tue, Mar 29, 2016 at 8:17 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Tue, Mar 29, 2016 at 1:11 PM, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
>> (BTW, isn't the select call in libpq_select
>> lacking an exceptfds set, and can't it therefore block forever when
>> there is an error condition on the socket and no timeout?)
>
> Hm. I think you're right here when timeout is NULL... It would loop infinitely.
> @Andres (in CC): your thoughts on that regarding the new
> WaitEventSetWaitBlock()? The same pattern is used there.

That was a red herring.  I was confused because SUSv2 and POSIX call
this argument 'errorfds' and say that sockets *also* tell you about
errors this way.  (Many/most real OSs call the argument 'exceptfds'
instead and only use it to tell you about out-of-band data and
possibly implementation specific events for devices, pseudo-terminals
etc.  If you want to know about errors on a socket it's enough to have
it in readfds/writefds, and insufficient to have it only in
errorfds/exceptfds unless you can find a computer that actually
conforms to POSIX.)

-- 
Thomas Munro
http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: what to revert
Next
From: Andres Freund
Date:
Subject: Re: Proposal: "Causal reads" mode for load balancing reads without stale data