Sunday, 17 January 2016

Postgresql 9.4 master-master replication

Postgresql database has come a long way since its initial release. One of the feature that can come in very handy in handling database that are located across geographical region is multi-master replication. The idea is to provide localised access to the database for each sites and yet still maintain a single view of the database. There are two solution that can get this done rather painlessly.

Option 1: BDR
This is a new replication solution by second quadrant. Still in beta but the ease of installation is very promising. The quirks:
a. Some of the database administrative functions are rendered inoperative.
b. A global sequence need to be explicitly set during table creation. Otherwise, would have a lot of write failure as the sequences are being replicated asynchronously.
c. Need a patched version of Postgresql 9.4.

Option 2: Bucardo
This solution has been around for quite sometime and is quite stable. The latest version which is 5.4 added support for multi-masters. The quirks:
a. DDL is not replicated. Any update to DDL need to be manually handled across all nodes.
b. Sequences is not replicated. A good strategy is to increment the sequence by the number of nodes installed.

Personally I prefer BDR solution as DDL and sequences replication can make deployment so much easier.


  1. It’s nice and valuable information, really appreciate for the nice blog...!!

    Hi guyz click here Best Pega Training in Bangalore to get the best knowledge and details and also 100% job assistance hurry up...!!


  2. Blockchain Course in Bangalore with 100% placement. We are the Best Blockchain Course Institute in Bangalore. Our Agile testing course and Certification courses are taught by working professionals who are experts in Blockchain.

    Blockchain Training in Bangalore

    Blockchain course in bangalore

    Blockchain in bangalore

    Blockchain classes in bangalore

    Blockchain course institute in bangalore

    Agile testing course and Certification course syllabus

    best Blockchain course

    Blockchain course centers

  3. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot.

    SAP ABAP Online Training

    SAP ABAP Classes Online

    SAP ABAP Training Online

    Online SAP ABAP Course

    SAP ABAP Course Online

  4. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me.

    devops Training in Bangalore

    Best Devops Training Institutes in Bangalore

  5. 192.168.l.254.254 IP address is allocated by many brands to log in to the router management interface.

  6. Very interesting post and thanks for your knowledgeable sharing with us. Keep doing well!
    Virginia Online Divorce
    Divorce Lawyer Consultation Cost
    Divorce in Virginia with Child

  7. Drilling employs rotating drill bits to produce the cylindrical holes within the workpiece. The design of the drill bit permits for the waste metal—i.e., chips—to fall away from the workpiece. There are quantity of} kinds of drill bits, every of which is used for a specific utility. Types of drill bits obtainable embrace recognizing drills , peck drills , screw machine drills , and chucking reamers . CNC machining processes may be carried out in-house—if the company invests in acquiring and maintaining their own Shower Caps CNC equipment—or out-sourced to devoted CNC machining service providers. CNC machining as a producing course of and service is out there worldwide.