Thread: DB Switch over and Switch back support
Hi Team,
I have configured master and slave DB's. Need to configure switcher and switch back setup. I checked google but I am unable to find the correct link. Kindly share with me. If any one has the setup document.
Also please confirm. Without using any third party s/w. We can do DB switch over and switch activity?
Regards,
Jayakumar.S
Hello,
If you did this with the replication method physically it's not possible. You can manage it with Crontab on the OS.
As an example ;
Switchover 1 from node 1 to node 2.
- Make failover on your replica. sudo pg_ctlcluster 14 main promote
Switchover 2 :
On node 1 clear your data path and make a new replica from node 2 to node 1 then make failover again.
Switchover 1 from node 1 to node 2.
- Make failover on your replica. sudo pg_ctlcluster 14 main promote
Switchover 2 :
On node 1 clear your data path and make a new replica from node 2 to node 1 then make failover again.
You can prepare the steps and manage them with Crontab or some bash script. Bash script might work better for this I think.
It could work mostly with less data-sizing environments. If you have a load environment I would advice you to patroni cluster system.
It could work mostly with less data-sizing environments. If you have a load environment I would advice you to patroni cluster system.
Have a nice weekend.
jayakumar s <kumardba27.postgresql@gmail.com>, 22 Kas 2024 Cum, 18:59 tarihinde şunu yazdı:
Hi Team,I have configured master and slave DB's. Need to configure switcher and switch back setup. I checked google but I am unable to find the correct link. Kindly share with me. If any one has the setup document.Also please confirm. Without using any third party s/w. We can do DB switch over and switch activity?Regards,Jayakumar.S