From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Postgresql Split Brain: Which one is latest
Date: Tue, 10 Apr 2018 11:52:50 -0500
Message-ID: <374d1972-342d-2ccb-8a48-db4a1272587b@gmail.com> (raw)
In-Reply-To: <CAN6gwKx_RA+Zh6UP3vb4CqM8+cyS2Kejtw8F_Hs_jwS8u8KvyQ@mail.gmail.com>
References: <CAN6gwKz3jOEes0JxRo44JTz+crysqg+LtRk_Je1rvZeUrPCi+Q@mail.gmail.com>
<fb6d574a-6d7a-56e8-25c8-a30f40c0ad42@aklaver.com>
<CAN6gwKzRyw=0EWb0eQg1qTDSoQQY+B0_Tn916KA+467sqKuchQ@mail.gmail.com>
<20ab2308-f781-ef04-3a99-7197dc83315b@aklaver.com>
<CAN6gwKx_RA+Zh6UP3vb4CqM8+cyS2Kejtw8F_Hs_jwS8u8KvyQ@mail.gmail.com>
You need to find out when the split happened, and whether each new master
have records since then.
On 04/10/2018 11:47 AM, Vikas Sharma wrote:
> Thanks Adrian and Edison, I also think so. At the moment I have 2 masters,
> as soon as slave is promoted to master it starts its own timeline and
> application might have added data to either of them or both, only way to
> find out correct master now is the instance with max count of data in
> tables which could incur data loss as well. Correct me if wrong please?
>
> Thanks and Regards
> Vikas
>
> On Tue, Apr 10, 2018, 17:29 Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
> On 04/10/2018 08:04 AM, Vikas Sharma wrote:
> > Hi Adrian,
> >
> > This can be a good example: Application server e.g. tomcat having two
> > entries to connect to databases, one for master and 2nd for Slave
> > (ideally used when slave becomes master). If application is not able to
> > connect to first, it will try to connect to 2nd.
>
> So the application server had a way of seeing the new master(old slave),
> in spite of the network glitch, that the original master database did not?
>
> If so and it was distributing data between the two masters on an unknown
> schedule, then as Edison pointed out in another post, you really have a
> split brain issue. Each master would have it's own view of the data and
> latest update would really only be relevant for that master.
>
> >
> > Regards
> > Vikas
> >
> > On 10 April 2018 at 15:26, Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>
> > <mailto:adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>>> wrote:
> >
> > On 04/10/2018 06:50 AM, Vikas Sharma wrote:
> >
> > Hi,
> >
> > We have postgresql 9.5 with streaming replication(Master-slave)
> > and automatic failover. Due to network glitch we are in
> > master-master situation for quite some time. Please, could you
> > advise best way to confirm which node is latest in terms of
> > updates to the postgres databases.
> >
> >
> > It might help to know how the two masters received data when they
> > where operating independently.
> >
> >
> > Regards
> > Vikas Sharma
> >
> >
> >
> > --
> > Adrian Klaver
> > adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> <mailto:adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>
> >
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
--
Angular momentum makes the world go 'round.
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: ronljohnsonjr@gmail.com
Subject: Re: Postgresql Split Brain: Which one is latest
In-Reply-To: <374d1972-342d-2ccb-8a48-db4a1272587b@gmail.com>
References: <CAN6gwKz3jOEes0JxRo44JTz+crysqg+LtRk_Je1rvZeUrPCi+Q@mail.gmail.com> <fb6d574a-6d7a-56e8-25c8-a30f40c0ad42@aklaver.com> <CAN6gwKzRyw=0EWb0eQg1qTDSoQQY+B0_Tn916KA+467sqKuchQ@mail.gmail.com> <20ab2308-f781-ef04-3a99-7197dc83315b@aklaver.com> <CAN6gwKx_RA+Zh6UP3vb4CqM8+cyS2Kejtw8F_Hs_jwS8u8KvyQ@mail.gmail.com> <374d1972-342d-2ccb-8a48-db4a1272587b@gmail.com>
* 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