0

For High Availability on DB was build Active-Standby(replica) cluster on Postgresql-13. Inserting data correctly transfer to 'replica' server, it is ok. Now, I want check case, how i can make change roles on two servers. for this I the /var/lib/postgresql/13/main/standby.signal was delete, also for apply changes restarted postgrsql.service Something tells me what I'm doing wrong. So,

  1. how to make a master out of a replica,
  2. how then from the old master (which was temporarily not available) to make the master back, without losing data?

Sorry for my English.

Red Hat
  • 5
  • 2
  • In a HA, you should be able to turn off a switch port on the primary, initiate your failover process, and do the reverse to fail back. https://www.postgresql.org/docs/current/app-pgrewind.html "A typical scenario is to bring an old primary server back online after failover as a standby that follows the new primary." – Greg Askew Apr 15 '22 at 10:57
  • thx sir, data was success transfer to old-master, but i have one issue, how now to make a replica-srv a replica? (I made changes on the master, but this data did not go to the replica) – Red Hat Apr 15 '22 at 17:22
  • now I created a slot on the master, and again reconnected the replica, and it works. I don’t know if I’m configure true(according to the documentation), but now the changes in the master appear in the replica – Red Hat Apr 15 '22 at 17:34

0 Answers0