Re: switchover/switchback

From: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
To: MirrorX <mirrorx(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: switchover/switchback
Date: 2019-03-02 04:54:21
Message-ID: CAGDYbUOqWt2CVTvBoMywTa-70UZsJy3DtN_bpBLMt4btvQKGjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
Yes, this works, when your master goes down, you can promote a slave as a
new master and to bring the old master in sync will have to rebuild it from
the new master but manual intervention is there.
You can achieve this by using the pgpool auto failover mechanism by adding
your owned scripts as per your requirement to avoid the manual intervention.

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com

On Fri, Mar 1, 2019 at 7:20 PM MirrorX <mirrorx(at)gmail(dot)com> wrote:

> starting with 9.3 i ve read on the EDB site about the possibility to
> switchover/switchback in a controlled manner.
> this way the current master is stopped, the slave is promoted to master and
> then since the old master's xlog position is behind the new master's, it
> can
> be directly connected as a new slave without the need of it being rebuilt
> and also without the need to use pg_rewind (since the xlog position hasnt
> moved forward). this is been possible after 2 commits, the one about the
> walsender sending all the xlogs to the slave when the master is being shut
> down and the second is about the timeline and how the slave can continue
> replicating when the timeline has changed.
>
> i have tested this many times and it has always worked. however, i find it
> strange that there is little awareness about it and pg professionals that i
> meet keep saying that the old master (new slave) needs to be rebuilt.
> could someone clarify if this works and if not why it could potentially
> fail?
>
>
> thank you in advance
>
>
>
> --
> Sent from:
> http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Anjul Tyagi 2019-03-02 07:48:27 Install Barman on SUSE
Previous Message MirrorX 2019-03-01 14:56:36 Re: Make grant all on all tables in schema x persistent for new tables