Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Jehan-Guillaume (ioguix) de Rorthais
On Tue, 10 Apr 2018 17:02:39 + Vikas Sharma wrote: > Max count is one way (vague I agree), before confirming I will ask the > application owner to have a look on data in tables as well. Maybe you could compare your tables on both sides using a tool like pg_comparator? See: https://cri.ens

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Adrian Klaver
On 04/10/2018 10:02 AM, Vikas Sharma wrote: Max count is one way (vague I agree), before confirming I will ask the application owner to have a look on data in tables as well. Along that line and dependent on the size of the database and individual tables you might try: 1) Do a plain text dum

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Vikas Sharma
Max count is one way (vague I agree), before confirming I will ask the application owner to have a look on data in tables as well. Regards On Tue, Apr 10, 2018, 17:55 Adrian Klaver wrote: > On 04/10/2018 09:47 AM, Vikas Sharma wrote: > > Thanks Adrian and Edison, I also think so. At the moment

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Adrian Klaver
On 04/10/2018 09: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 th

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Ron
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 applic

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Vikas Sharma
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 whic

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Adrian Klaver
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

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Edson Carlos Ericksson Richter
Em 10/04/2018 12:28, Melvin Davidson escreveu: On Tue, Apr 10, 2018 at 11: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 Slav

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Melvin Davidson
On Tue, Apr 10, 2018 at 11: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 > f

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Vikas Sharma
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. Regards Vikas On 10 April 20

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Adrian Klaver
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 up

Re: Postgresql Split Brain: Which one is latest

2018-04-10 Thread Achilleas Mantzios
On 10/04/2018 16:50, 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

Postgresql Split Brain: Which one is latest

2018-04-10 Thread Vikas Sharma
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. Regards Vikas S