Re: Replication to Postgres 10 on Windows is broken

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Petr Jelinek <petr@2ndquadrant.com>, Peter Eisentraut <peter_e@gmx.net>, Noah Misch <noah@leadboat.com>, "Augustine, Jobin" <jobin.augustine@openscg.com>, pgsql-bugs@postgresql.org
Date: 2017-08-06T22:17:17Z
Lists: pgsql-bugs, pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2017-08-06 18:04:49 -0400, Tom Lane wrote:
>> io_flag has to be *just* the I/O condition, because we use it in a test
>> after the WaitLatchOrSocket call.

> Hm, right. Wouldn't be particularly consequential,

Yes, it would be.  The entire point of this loop is to avoid blocking
in PQconnectPoll, and that's not guaranteed unless we honor the contract
of only calling it when we've gotten the read-ready or write-ready status
it asked for.

			regards, tom lane


Commits

  1. Distinguish wait-for-connection from wait-for-write-ready on Windows.

  2. Use asynchronous connect API in libpqwalreceiver