Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver

Andrew Dunstan <andrew.dunstan@2ndquadrant.com>

From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Petr Jelinek <petr.jelinek@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Date: 2017-03-17T14:51:43Z
Lists: pgsql-hackers

On 03/08/2017 08:29 PM, Andrew Dunstan wrote:
>
> On 03/08/2017 08:33 AM, Peter Eisentraut wrote:
>> On 3/6/17 09:38, Peter Eisentraut wrote:
>>> On 3/4/17 01:45, Petr Jelinek wrote:
>>>> If that's the case, the attached should fix it, but I have no way of
>>>> testing it on windows, I can only say that it still works on my machine
>>>> so at least it hopefully does not make things worse.
>>> Committed that.  Let's see how it goes.
>> So that didn't work.  Now we probably need someone to dig into that host
>> directly.
>>
>> Andrew, could you help?
>>
>
> I'll take a look when I get a chance. Might be a few days.
>



I have confirmed on jacana Petr's observation that adding a timeout to
the WaitLatchOrSocket cures the problem.

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Fix WaitEventSetWait() to handle write-ready waits properly on Windows.

  2. Rewrite async-connection loop in libpqwalreceiver.c, once again.

  3. Use asynchronous connect API in libpqwalreceiver