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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver
Date: 2017-03-17 19:04:12
Message-ID: 25652.1489777452@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)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 up and 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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-03-17 19:06:14 Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver
Previous Message Tom Lane 2017-03-17 18:58:14 pgsql: Fix WaitEventSetWait() to handle write-ready waits properly on W

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-03-17 19:06:14 Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver
Previous Message Andrew Dunstan 2017-03-17 18:51:54 Re: [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver