Re: Swapping master and slave

From: Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com>
To: Yambu <hyambu(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Swapping master and slave
Date: 2020-11-27 05:18:54
Message-ID: CAFpL5VzF6q9Uri4izerxs5NaLcF-+DNazvQUNKub1HZ9VCZG4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)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
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2020-11-27 07:40:13 Re: Query column null
Previous Message Yambu 2020-11-27 02:18:22 Swapping master and slave