Re: Swapping master and slave - Mailing list pgsql-admin

From Nikhil Shetty
Subject Re: Swapping master and slave
Date
Msg-id CAFpL5VzF6q9Uri4izerxs5NaLcF-+DNazvQUNKub1HZ9VCZG4A@mail.gmail.com
Whole thread Raw
In response to Swapping master and slave  (Yambu <hyambu@gmail.com>)
List pgsql-admin
Hi Yambu,

If you have a failover tool like EDB EFM,repmgr or others then it will automatically take care of promoting the standby to master and reconfiguring old master as new slave when you do a switchover.

If you don't have such tools then you can manually promote the standy to be the new master and run a pg_rewind on the old master to sync with the new master. If pg_rewind does not work then you will have to rebuild the old master using pg_basebackup.

Thanks and Regards,
Nikhil

On Fri, Nov 27, 2020 at 7:48 AM Yambu <hyambu@gmail.com> wrote:
Hello

If i want to swap master and slave servers, do i have to run the pg_basebackup on the new slave ?

regards

pgsql-admin by date:

Previous
From: Yambu
Date:
Subject: Swapping master and slave
Next
From: Laurenz Albe
Date:
Subject: Re: Query column null