Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver
Date
Msg-id 25652.1489777452@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API inlibpqwalreceiver  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> On 03/17/2017 12:28 PM, Tom Lane wrote:
>> I'll add some comments and push this.  Does everyone agree that
>> this had better get back-patched, too?

> Confirmed that this fixes the problem on jacana.
> +1 for backpatching.

I've pushed this into 9.6, but the WaitEventSet code doesn't exist before
that.  It might be that we should apply a similar fix to the predecessor
code, but I'm not really excited about it given that we have no indication
that the bug can be hit in the older branches.  Anyway, lacking a Windows
machine to test on, I have no interest in trying to make such a patch
blindly.

> Does that mean we could remove the special logic in pgstat.c?

If you mean the bit near line 3930 about
        * Windows, at least in its Windows Server 2003 R2 incarnation,        * sometimes loses FD_READ events.  Waking
upand retrying the recv()        * fixes that, so don't sleep indefinitely.  This is a crock of the        * first
water,but until somebody wants to debug exactly what's        * happening there, this is the best we can do.
 

that doesn't seem related --- that's about missing FD_READ events not
FD_WRITE.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API inlibpqwalreceiver
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver