Postgresql – Master ip has changed in postgresql replication

postgresqlreplication

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.

Best 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.