Manual Failover

Started by Yongye Serkfemalmost 2 years ago3 messagesgeneral
Jump to latest
#1Yongye Serkfem
yserkfem@gmail.com

Hello Engineers,
I am facing an issue with the manual failover of the standby to the master
role. I was able to promote the standby and got it out of recovery mode.
How do I direct applications to point to the standby which has assumed the
role of the current master, and what should I do after completing
maintenance on the previous master to assume its original role as master?
I would appreciate any input, and thank you for your time.

Yongye Serkfem

#2Rob Sargent
robjsargent@gmail.com
In reply to: Yongye Serkfem (#1)
Re: Manual Failover

On 6/19/24 09:03, Yongye Serkfem wrote:

Hello Engineers,
I am facing an issue with the manual failover of the standby to the
master role. I was able to promote the standby and got it out of
recovery mode. How do I direct applications to point to the standby
which has assumed the role of the current master, and what should I do
after completing maintenance on the previous master to assume its
original role as master?
I would appreciate any input, and thank you for your time.

Yongye Serkfem

You need to show your set up (failover script, etc) but usually the
standby get the ip address of the now-dead master and the apps are none
the wiser.

#3Ron
ronljohnsonjr@gmail.com
In reply to: Yongye Serkfem (#1)
Re: Manual Failover

On Wed, Jun 19, 2024 at 11:03 AM Yongye Serkfem <yserkfem@gmail.com> wrote:

Hello Engineers,
I am facing an issue with the manual failover of the standby to the master
role. I was able to promote the standby and got it out of recovery mode.
How do I direct applications to point to the standby which has assumed the
role of the current master,

A typical solution is a separate service which manages a virtual IP that
points to whichever DB server you choose.

and what should I do after completing maintenance on the previous master
to assume its original role as master?

pg_basebackup is guaranteed to get previous-master in sync with
now-active. pg_rewind might also work.