From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Virendra Kumar <viru_7683@yahoo.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
To: Daulat Ram <Daulat.Ram@exponential.com>
Subject: Re: Real application clustering in postgres.
Date: Fri, 06 Mar 2020 09:59:33 +0100
Message-ID: <8e9aacea5fe0462f041b368cc85edb745ed30176.camel@cybertec.at> (raw)
In-Reply-To: <1087099197.4979138.1583427977985@mail.yahoo.com>
References: <BY5PR01MB58436F3E3FCE8FD0CF73A29F9BE20@BY5PR01MB5843.prod.exchangelabs.com>
<1aa5a345543ea85b3e0e7d3021ed6b1cdc04e66c.camel@cybertec.at>
<BY5PR01MB5843F875A8C39542862253F99BE20@BY5PR01MB5843.prod.exchangelabs.com>
<1087099197.4979138.1583427977985@mail.yahoo.com>
On Thu, 2020-03-05 at 17:06 +0000, Virendra Kumar wrote:
> Failover is easy but failback is little bit tricky.
> I have implemented failback by doing following steps:
>
> 1. Start original primary which will be doing crash recovery. It should be designed in such a way that once it is up application should not start connecting to it otherwise there will be split brain
> and data-mistach between two instances. I implemented it by using a virtual IP mounting on server which is actual primary using keepalived.
> 2. Shutdown original primary and do a pg_rewind to make that as slave for new primary.
> 3. Once slave (original primary) is caught up with primary do failback
> 4. Repeat steps #1-#3 to make failed over instance slave again.
Or you use Patroni and simply say
patronictl.py switchover --candidate db2 --scheduled '2020-03-06 12:00:00' mycluster
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, viru_7683@yahoo.com, Daulat.Ram@exponential.com
Subject: Re: Real application clustering in postgres.
In-Reply-To: <8e9aacea5fe0462f041b368cc85edb745ed30176.camel@cybertec.at>
References: <BY5PR01MB58436F3E3FCE8FD0CF73A29F9BE20@BY5PR01MB5843.prod.exchangelabs.com> <1aa5a345543ea85b3e0e7d3021ed6b1cdc04e66c.camel@cybertec.at> <BY5PR01MB5843F875A8C39542862253F99BE20@BY5PR01MB5843.prod.exchangelabs.com> <1087099197.4979138.1583427977985@mail.yahoo.com> <8e9aacea5fe0462f041b368cc85edb745ed30176.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox