Master ip has changed in postgresql replication

Posted on

Question :

I have postgresql replication system with two machines, suppose I want to change the master ip,the streaming to slave machine will stop. Can I resume streaming with the new master ip instead of doing the replication from scratch.

Answer :

Easy, just change host in primary_conninfo and restart the standby.

This replication parameter can be found in recovery.conf before v12 and in postgresql.conf after that.

Leave a Reply

Your email address will not be published. Required fields are marked *