Magnus Hagander <magnus@hagander.net> writes:
> On Wed, Apr 4, 2012 at 17:57, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I rather wonder whether the #ifdef WIN32 bit in the backend isn't dead
>> code though. If the port isn't in nonblock mode, we shouldn't really
>> get here at all, should we?
> Not in a position to look at the code right now, but first guess - we
> *always* have the underlying socket in nonblocking mode on win32, so
> we can deliver signals properly.
Ah, I think you're right. So actually, the retry looping is expected
to be never-invoked in the Unix case. If it did happen, it'd be a busy
wait loop, which would probably be a bad thing ... but it shouldn't
happen, and not clear it's worth adding any code to consider the
possibility more carefully.
regards, tom lane