Re: BDR OR MASTER SLAVE REPLICATION WITH REPMGR IS SUITABLE FOR LARGEONLINE APPLICATION - Mailing list pgsql-admin

From soumitra bhandary
Subject Re: BDR OR MASTER SLAVE REPLICATION WITH REPMGR IS SUITABLE FOR LARGEONLINE APPLICATION
Date
Msg-id MA1PR01MB35481282A696D5EB16A19FCBE0280@MA1PR01MB3548.INDPRD01.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: BDR OR MASTER SLAVE REPLICATION WITH REPMGR IS SUITABLE FOR LARGEONLINE APPLICATION  (Rijo Roy <royvk6644@gmail.com>)
Responses Re: BDR OR MASTER SLAVE REPLICATION WITH REPMGR IS SUITABLE FORLARGE ONLINE APPLICATION  (Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>)
List pgsql-admin
Thanks for the response . 

Here is my observation / queries  about BDR ,  correct me if I am missing anything . Any other issue with BDR if you guys faced let me  know .  

  1. Due to any reason if replication is failing and replication log byte size reaches more than 1GB . Then corresponding replication slot become unresponsive and need to set up BDR again.
  2. Due to any issue (may be network failure or any key conflicts) if replication is stopped or failing then apart from re initializing the cluster (using bdr_init_copy )  any other approach is there to revive the replication ? As bdr.bdr_group_join  does not work well for large databases for more than 100 GB .
  3. For a large OLTP application does BDR replicates the changes made to procedure, function ,triggers  , views definition,  across the cluster if I set the replication at DB level ? (I am not sure as not tested)
  4. Though BDR tries to resolve conflicts using a simple last-update-wins strategy, but still conflicts as mentioned below are very common in a production instance . Are these taken care in the licensed version ?

ERROR:  insert or update on table "AAAAA" violates foreign key constraint "fk_traf444kk6qrkms7n56aiwq5y"

Violating foreign key constraint ,whereas other node is having record.

ERROR: multiple unique constraints violated by remotely Inserted tuple

An INSERT/INSERT conflict can violate more than one UNIQUE constraint (of which one might be the PRIMARY KEY).

  1. Back up , recovery and PITR process . As per the documentation , Logical replication cannot be used for point-in-time recovery . So what is the extent of this statement ?  Does it imply even we run the DBs in archival mode and use pg_basebackup to take file level back up in a running instance?

Thanks , 
Soumitra 


From: Rijo Roy <royvk6644@gmail.com>
Sent: Friday, April 12, 2019 7:42 AM
To: soumitra bhandary
Cc: Prince Pathria; pgsql-admin@lists.postgresql.org
Subject: Re: BDR OR MASTER SLAVE REPLICATION WITH REPMGR IS SUITABLE FOR LARGE ONLINE APPLICATION
 
BDR is best when you have a need of multi-master environment like a distributed database paradigm where you have a need of writing/reading to/from local masters let's say masters in NY, London, China, India etc.. And it uses pglogical to achieve this with a globally managed transaction XID's. It needs to be properly tested how it handles conflicts in a heavy oltp workload application.
If you only need high availability for a heavy oltp application, a well set active passive model of streaking replication backed by repmgr where writes are only hitting primary and reads on standby will help. Otherwise you can also consider citusdata.. 

Note: I am not an advocate of any vendors, my comments are purely based on my experience and I love Postgresql the way it is!

Regards, 
Rijo Roy 


On Fri, 12 Apr 2019, 6:34 am soumitra bhandary, <soumitra.bhandary@hotmail.com> wrote:
To ensure zero down time. 

Sent from my iPhone

On 12-Apr-2019, at 12:35 AM, Prince Pathria <prince.pathria@goevive.com> wrote:

It very much depends upon your use case. Why you want a multi master implementation? 
 
Happy to help :)
Prince Pathria Systems Engineer Evive +91 9478670472 goevive.com


On Thu, Apr 11, 2019 at 8:03 PM soumitra bhandary <soumitra.bhandary@hotmail.com> wrote:
Hi ,

Can anyone suggest me for large OLTP application which sort of replication is suitable BDR or master slave replication with synchronous and asynchronous node and REPMGR enabled.
Can BDR handle real-time conflicts arises due to high network latency or Dataintegrity conflicts?? Please suggest

Sent from my iPhone

pgsql-admin by date:

Previous
From: Rijo Roy
Date:
Subject: Re: BDR OR MASTER SLAVE REPLICATION WITH REPMGR IS SUITABLE FOR LARGEONLINE APPLICATION
Next
From: Alvaro Aguayo Garcia-Rada
Date:
Subject: Re: BDR OR MASTER SLAVE REPLICATION WITH REPMGR IS SUITABLE FORLARGE ONLINE APPLICATION