Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1deNqv-00056J-1a for pgsql-bugs@arkaria.postgresql.org; Sun, 06 Aug 2017 15:52:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1deNqu-00042x-KN for pgsql-bugs@arkaria.postgresql.org; Sun, 06 Aug 2017 15:52:28 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1deNqu-00042o-7J for pgsql-bugs@postgresql.org; Sun, 06 Aug 2017 15:52:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1deNqr-0001xB-BL for pgsql-bugs@postgresql.org; Sun, 06 Aug 2017 15:52:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v76FqKY1005068; Sun, 6 Aug 2017 11:52:20 -0400 From: Tom Lane To: Noah Misch cc: "Augustine, Jobin" , pgsql-bugs@postgresql.org Subject: Re: Replication to Postgres 10 on Windows is broken In-reply-to: <3819.1502032677@sss.pgh.pa.us> References: <20170806062634.GA3180536@rfd.leadboat.com> <3819.1502032677@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sun, 06 Aug 2017 11:17:57 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5066.1502034740.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Aug 2017 11:52:20 -0400 Message-ID: <5067.1502034740@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org I wrote: > Gut instinct says that the reason this case fails when other tools > can connect successfully is that libpqwalreceiver is the only tool > that uses PQconnectStart/PQconnectPoll rather than a plain > PQconnectdb, and that there is some behavioral difference between > connectDBComplete's wait loop and libpqrcv_connect's wait loop that > OpenSSL is sensitive to --- but only on Windows, and maybe only on > particular OpenSSL versions. On closer inspection, I take that back. This can't be directly OpenSSL's fault, because those error messages come out before libpq has invoked OpenSSL at all; in particular we see 2017-08-03 10:49:41 UTC [2108]: [1-1] user=3D,db=3D,app=3D,client=3D FATAL:= could not connect to the primary server: could not send data to server: S= ocket is not connected (0x00002749/10057) could not send SSL negotiation packet: Socket is not connected (0x00002749/10057) and "could not send SSL negotiation packet" certainly must occur before we've asked OpenSSL to do anything. What seems likely to me at this point is that the changes in PQconnectPoll() to support multiple hosts are somehow responsible. It must still be connected to libpqwalreceiver's different wait loop, but the details are unclear. It would likely be useful to add some debug logging to PQconnectPoll to find out what set of addresses it's seeing and whether this failure occurs after having advanced over some of them. regards, tom lane --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs