Re: Streaming Replication - changing IP addresses - Mailing list pgsql-general

From John R Pierce
Subject Re: Streaming Replication - changing IP addresses
Date
Msg-id 548605F3.6030200@hogranch.com
Whole thread Raw
In response to Streaming Replication - changing IP addresses  (Dara Unglaube <dara@glifwc.org>)
Responses Re: Streaming Replication - changing IP addresses
List pgsql-general
On 12/8/2014 11:56 AM, Dara Unglaube wrote:
We have streaming replication set up on two servers that are on our local network using their external/public IP addresses. We are switching internet providers and need to change the external/public IP addresses of both servers. I'm not sure how to go about this correctly.
  1. Our local network IP addresses will not be changing, is there any reason we could/should not use our local network IP addresses in the streaming replication process?
  2. What is the best route to make these changes? Is it as simple as turning postgres off on both servers, changing the IP settings (master - postgres.conf and hba.conf and slave - recovery.conf files to the local network IPs) and starting the service up again? Can anyone point me to an example?

Any tips, suggestions, help you could provide would be greatly appreciated.

Thanks in advance for your time!


if these two servers are both local, there's absolutely no reason to use public IP space for this, they should be using their local addresses, faster, lower latency, otherwise each round trip packet is going through 4 layers of NAT (out, in, then out, in again to return).

make sure the master allows the slave replication account to connect via its local IP (this would be in pg_hba.conf, and  a 'reload'), then change the address the slave is using to connect to the master, and restart the slave, and it all should be good. 



-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Divergences in view source code - both servers 9.3.5
Next
From: Adrian Klaver
Date:
Subject: Re: Fwd: Fwd: Problem with pg_dump and decimal mark