...
Database Status
Standby server should be “HOT STANDBY“/”WARM STANDBY”
Drawio | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
...
|
...
|
...
|
...
|
...
|
...
|
...
Trigger Activate
Disable Control Center Behaviors
Disable Observer: Turn off the observer node to ensure a smooth switchover without conflicting activities
Disable Auto Update: Suspend any automatic update processes during the switchover procedure
Promote Standby database to Primary database
Code Block pg_ctl promote -D data_dir
The standby server stops streaming data replication from the primary server.
The standby server disconnects from the primary server.
The standby server modifies its own configuration to become a primary server.
The standby server starts accepting read and write operations.
Clients and applications that were connecting to the old primary server may need to be reconfigured to connect to the newly promoted primary server.
Switch Role and Persist new configuration data with failover mark
Enable Control Center Behaviors
Enable Observer
Enable Auto Update: Restore the automatic update processes
Execute User Script on New Primary and Standby Servers
Run any necessary user scripts on the new primary and new standby servers to complete the switchover process.
|
...
|
3. Activate Standby
The standby cluster is ready for activation
Option to have custom scripts that can be run on both existing primary and standby host servers.
2. Click Activate to start the activation process. This would ask for further confirmation to activate the standby cluster.
Post activation the configuration status changes to “ IN FAILOVER STATE.”
The original standby server is now changed to ONLINE status, and this server acts as the primary cluster server.
The original primary server status is now ONLINE (Usually in a true DR scenario the status would be offline)
...
The configuration status IN FAILOVER STATE. The original standby is the new primary.
The status of the original primary is down.
The configuration is confirmed to be ready for recovery from failover.
Click on “Recover From Failover” to start the process.
After the above process completes, log in on the server and clean up the data directory of the old primary. The option to set up the DR database will appear and click on the“Set up now?” to create the DR cluster on the original primary.
...