Re: Advice for geographically dispersed multi master

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: nikolai(at)lusan(dot)id(dot)au, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Advice for geographically dispersed multi master
Date: 2019-10-03 11:20:20
Message-ID: 76252c7d079e9d6a72b3bf1cc09098c98df070c4.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2019-10-03 at 19:05 +1000, Nikolai Lusan wrote:
> So I am looking to move my current setup of 3 separate, individual,
> postgres 11 servers into a multi master cluster.
>
> I have read the various replication and clustering documentation for
> postgresql 11, and it looks like what I want is "Synchronous
> Multimaster Replication". The organisation I am doing this for does
> not have the money to throw at a commercial solution like BRD

Don't do it then.

As far as I know, there are only closed source solutions for this.

95% of all requests for multi-master replication come from people
who know little about databases and just want "a couple of databases
that all hold the same data and magically reconcile with each other".

Any multi-master solution will require the application to be
written with special awareness of a multi-master database.

For example, there will have to be special considerations with
auto-generated primary keys, and you will have to avoid certain
operations altogether.

Imagine this situation:

DB 1 DB 2

DELETE FROM tab UPDATE tab
WHERE id = 42 SET id = 1 WHERE id = 42

If these statements are executed at the same time on two
databases and then replicated, DB 2 will end up with one row
more in the table than DB 1.

Try to find a solution with a single master database.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2019-10-03 11:34:18 Re: partitions vs indexes
Previous Message bhargav kamineni 2019-10-03 10:57:48 PMChildFlags array