Re: Replication to Postgres 10 on Windows is broken

From: Igor Neyman <ineyman(at)perceptron(dot)com>
To: "Augustine, Jobin" <jobin(dot)augustine(at)openscg(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Replication to Postgres 10 on Windows is broken
Date: 2017-08-04 13:23:26
Message-ID: DM5PR17MB149904D416723D5B77604CAADAB60@DM5PR17MB1499.namprd17.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


From: pgsql-bugs-owner(at)postgresql(dot)org [mailto:pgsql-bugs-owner(at)postgresql(dot)org] On Behalf Of Augustine, Jobin
Sent: Friday, August 04, 2017 1:54 AM
To: pgsql-bugs(at)postgresql(dot)org
Subject: [BUGS] Replication to Postgres 10 on Windows is broken

Attention: This email was sent from someone outside of Perceptron. Always exercise caution when opening attachments or clicking links from unknown senders or when receiving unexpected emails.

Summary:
Replica / Slave on Windows fails to conenct to Master.

Scenario:
Master: PostgreSQL 10 (beta1,beta2), Any OS (Linux, Windows, Mac)
Slave : PostgreSQL 10 (beta1,beta2), Windows (Any MS Windows OS)
Slave must be on Windows Machine running on a different server than the Master

Steps to reproduce:
1. Setup a Postgres 10betaX master database can be on any platform (Linux/Windows/Mac)
2. Try to setup a streaming replica on any of the MS Windows running a different Server than the master
(replication within the same server works!)

Error in Postgres logs:
Lines like below keep repeating in Slave side postgres log
----------------------
2017-08-03 10:49:41 UTC [2108]: [1-1] user=,db=,app=,client= FATAL: could not connect to the primary server: could not send data to server: Socket is not connected (0x00002749/10057)
could not send SSL negotiation packet: Socket is not connected (0x00002749/10057)
2017-08-03 10:49:45 UTC [3600]: [1-1] user=,db=,app=,client= FATAL: could not connect to the primary server: could not send data to server: Socket is not connected (0x00002749/10057)
could not send SSL negotiation packet: Socket is not connected (0x00002749/10057)
2017-08-03 10:49:50 UTC [4832]: [1-1] user=,db=,app=,client= FATAL: could not connect to the primary server: could not send data to server: Socket is not connected (0x00002749/10057)
could not send SSL negotiation packet: Socket is not connected (0x00002749/10057)
-------------------------

Additional Information:
Stand alone tools like psql, pg_basebackup, pg_recivewal etc are successful in connecting to primary server and perform their functionalities.
Postgres 9.6 replication works fine across same set of servers.
This Windows specific issue reproducible across pg10beta1 and beta2
This is tested and confirmed by multiple people from my team across different Windows versions.

-Jobin Augustine

Using PG10 Beta1 and BETA2 I’m getting the same error:

Socket is not connected (0x00002749/10057)
could not send SSL negotiation packet: Socket is not connected (0x00002749/10057)

with logical replication in Windows environment, when I’m trying to Create Subscription, even though any other connection from Subscriber server to Publisher server works quite fine, for instance there is no errors when using Postgres_fdw to connect from Subscriber server to Publisher server.
I reported this issue on this forum: Bug #14669, but didn’t get any replies.

Must be a common issue between streaming and logical replication in PG10 BETA in Windows environment.
I’d appreciate if someone from 2ndQardrant could take a look at this issue.

Regards,
Igor Neyman

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-08-05 16:39:19 Re: \copy produces CSV output that cannot be read by \copy
Previous Message Nicolas Barbier 2017-08-04 12:38:06 \copy produces CSV output that cannot be read by \copy

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-08-04 13:44:01 Re: Page Scan Mode in Hash Index
Previous Message Masahiko Sawada 2017-08-04 12:45:41 Re: pgbench: Skipping the creating primary keys after initialization