Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wAKca-002HJo-17 for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2026 04:34:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAKcY-004jE2-2n for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2026 04:34:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wAKcY-004jDs-0q for pgsql-admin@lists.postgresql.org; Wed, 08 Apr 2026 04:34:30 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wAKcM-000000019xG-1uGO for pgsql-admin@lists.postgresql.org; Wed, 08 Apr 2026 04:34:29 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-38e09b14102so20142181fa.0 for ; Tue, 07 Apr 2026 21:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775622856; cv=none; d=google.com; s=arc-20240605; b=V56MVSYcIytUceLpC3f8eea/2LFqAQTmR8yldizcNzMW1GMv0wMjf4GAQ3qriIi0Bf bdZVWeOXvMW12uklUwlJqA2zHyxKan85/Ht3+prbbuVBg8l7i4+P+Ual47tS+va85wH6 EpI6wYEBrIcXNnvNQrxeP/qcCQsO59HjI/9Wi+RFUYyw3dOcYJiVMKMsQ/H91cclu/GD IMvXaT0KMvCYNI8dO7jF3G2R3S8cyz6tPaMNJrUpphO6y1UWnwaHVIycoKV6yLW6w2hc bJmkwAb6sFHrCVwAhdEAqkR3vsxmC0/AkbpgyAzoolUGIeJzUAUSxabhYDby267Y2EHF k4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=eKHe35xN6+xCDUsmRsaRpNGd7OwjI5yTd5dORYBri10=; fh=HQzGXHzyMdqF1HAIXhSf5yra1gGhLDXkxIoAJez42aE=; b=IOGa5SIr1mVKlwkTJ5VPDzL42sOmh8maktKsw+zybuAhPKUXkZzZcBB3a5nLI0XyYH 478Kd5xFeFDDaqEUywPvqIgTc5sUqQjwRuLE5KcHgQCzeZQ9YlRHNpICYl1v8e19JMep bThxwG4wg5SiFlZ3d19UTgu89iT7n9qBpPjuz6cjnuWYBVWbQSxl1UOahCl/i8uhcHwk VXRYGRej3BND8cGroWBV9HIi5E2pG5tJlYZ9pRxD+fbfP68xrmqndfIzOvh1Yh+snwRZ P8fCysDLovzqvROk/CcuvTpde/aTqsReYOdzx2D7oplwEXyL5Rh6xI0rTE39cXNaD31v Wd1g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775622856; x=1776227656; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eKHe35xN6+xCDUsmRsaRpNGd7OwjI5yTd5dORYBri10=; b=qz1oaBuY9QuBynztUc6hTcdCXs7PigM9toJIkoMKaa0DdmdcMcq3uuZTypUQnjIoHo qk3JIohDyUJqcEeI5UFHkaR04i58PFB9maWOEBWTg5Jzr7BbOOhbSkVjS/vEAqLwUDrV hAT4ObQo9btW4E9KJTJOHSEVe08Sn4wc3qUaUaMI59KyTkoAJu1WpTDYwduJQbz2EMiK jlYNtYbRiYlBw9IcHOsPr6TyVjK2Gl4Tb4yLXqYauVHIdgnhzSdMw8dyM8yb1CGO6lJM XpG5LPz6OZqjqMLk126tndB+14n50aEwjhIPAJGj+/EzoAe7hu/VIARCSCHPkTQg4ZyP QS3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775622856; x=1776227656; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eKHe35xN6+xCDUsmRsaRpNGd7OwjI5yTd5dORYBri10=; b=pDAcbWQ1XUL4Pp8GciupbPhKDneFJjRgM3lGhVdNQxnPJPBbrd6aIMuMUTzZl/gPab rfxBLyIgaMZe1/b/tWMahY+7GVYy3oJC2CJVBU2ayxtXLK/ZuSBdodIql3hT7ggRAAT9 9S5OBd1/QPTZHd5RcQUlpM0bLlxb1anLilyfbZyBuYJIvwQwmlt//cLj7hTvOEfHp/hu e+2UuZqTi+KSCdfItsrW4JkUfiECAVgQ29hNFx5HRZkfhkaUBTeFAbvfwIsiaVmEC6+I 2r1Os+tgFqIAVAr2Mqpc+bYKyeBdoByerTukJndRyndUm/xQ0piw9IrNEsyLv2Jv3Qa3 DJMg== X-Forwarded-Encrypted: i=1; AJvYcCW/svm24s87LKuYU2RmxAp4c8jtrgRpatBP4jm2yCCln0J5DA6lra51aUG7s0RuiTqmd/7o28YpSNLpNQ==@lists.postgresql.org X-Gm-Message-State: AOJu0YyO7YjPI8C1s02pLtjDs4kz5ZKhi6RK9leJk92zsf9d0Sk0S9od i5R4P/m/y7DQAvmYA5IQvX8IOa5va4yCKskDQBTEcQFvM3DY3+Uitd7WzOJAmzQwXQfZpsS2spK J+Dr1spPPYGOEumsf4EWlxsiboLlloQg= X-Gm-Gg: AeBDieuDAKWisfA1FSgm9Ei0HlUZMZBGrCk0LMx1yOl2WoPRE6G6ceHxvt5X++X8dJf PpFbIHSGd8A8+NlCFi2TCmIpxbGl32JygqJ5Lfp9V1mK5l9uLp8uNSrXEwMlsfR8jTC99Q6U2oJ pSKKOlpQ60Y40zaS+slyCiRgT0yaDiB8BTBzF9Y9j6iEKXpXfemqqQoURc9AHGQFQyRnLdPNXJv E31JNuYegQrnF8pfVLjUZJ8oElZSgF5CttFuTmSmeTztKMze+IgyTtVx6ALv9zu/oeV0PSPDdnk 9EuUr71OFj+JOLyMM7y4uxvD/WMCsI3vp/XaA3g= X-Received: by 2002:a05:651c:1508:b0:38c:4b14:142e with SMTP id 38308e7fff4ca-38d97be28e7mr63404631fa.16.1775622855511; Tue, 07 Apr 2026 21:34:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eduar Flow Date: Tue, 7 Apr 2026 22:34:03 -0600 X-Gm-Features: AQROBzDWNNZMXBgQLk9ElN9CkgCnKSJX6ZQMZMB_AgVFnnxFMrBhavrduwUnsNw Message-ID: Subject: Re: How to setup Multi-master replication on postgresql 18 To: Jorge Batista Cc: Rajni Baliyan , =?UTF-8?Q?Muhammet_Kurto=C4=9Flu?= , akshay chandratre , Mahendra Singh , Pgsql-admin Content-Type: multipart/alternative; boundary="0000000000008ed11d064eeb69e0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008ed11d064eeb69e0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 1. Instalar PostgreSQL + BDR BDR no viene incluido en PostgreSQL est=C3=A1ndar. Necesitas EDB Postgres Distributed (antes BDR) Sitio: EnterpriseDB 2. Configurar par=C3=A1metros (postgresql.conf) Conf wal_level =3D logical max_replication_slots =3D 10 max_wal_senders =3D 10 max_worker_processes =3D 20 shared_preload_libraries =3D 'bdr' 3. Crear base de datos y habilitar BDR SQL CREATE DATABASE mydb; \c mydb CREATE EXTENSION bdr; 4. Crear nodo SQL SELECT bdr.create_node( node_name :=3D 'node1', dsn :=3D 'host=3DIP_NODE1 dbname=3Dmydb user=3Dpostgres password=3Dxxx' ); 5. Unir segundo nodo En el segundo servidor: SQL SELECT bdr.join_node( node_name :=3D 'node2', dsn :=3D 'host=3DIP_NODE2 dbname=3Dmydb user=3Dpostgres password=3Dxxx', join_using_dsn :=3D 'host=3DIP_NODE1 dbname=3Dmydb user=3Dpostgres passwo= rd=3Dxxx' ); =E2=9C=94=EF=B8=8F Ahora ambos pueden escribir (multi-master) Yekma666 El mar, 7 de abr de 2026, 10:52, Jorge Batista < Jorge.Batista@premier-research.com> escribi=C3=B3: > PostgreSQL logical replication supports bidirectional setups, but conflic= t > handling is not automated. The documentation itself highlights that > conflicts can arise when multiple nodes accept writes and resolving them = is > left to the application or design strategy. > > > > If the requirement is strictly open-source and limited to core PostgreSQL= , > the most direct option would be bi-directional logical replication (nativ= e > or pglogical). > > > > That said, PostgreSQL does not provide a fully managed multi-master > solution. In practice, this means: > > - No built-in conflict resolution (conflicts can stop replication) > - Risk of duplicate keys / concurrent update issues > - Sequences need coordination (or UUIDs) > - DDL is not automatically replicated > - Operational complexity increases significantly > > > > Because of this, the safest approach is usually to define data ownership > per node (e.g., by tenant or region) to avoid conflicts rather than tryin= g > to resolve them after the fact. > > > > Otherwise, pure core PostgreSQL multi-master setups can be difficult to > operate reliably in production. > > > > Regards > > > > *From:* Rajni Baliyan > *Sent:* Tuesday, April 7, 2026 4:16 AM > *To:* Muhammet Kurto=C4=9Flu > *Cc:* akshay chandratre ; Mahendra Singh < > msmahendrasingh18@gmail.com>; Pgsql-admin < > pgsql-admin@lists.postgresql.org> > *Subject:* Re: How to setup Multi-master replication on postgresql 18 > > > > EXTERNAL: This email originated from outside of our organization. Do not > click links or open attachments unless you recognize the sender and know > the content is safe. > > > > Hi Muhammet, > > You can achieve at certain level multi master replication using postgres > native logical replication. Latest version 18 has good conflict resolutio= n > as well. > > https://www.postgresql.org/docs/current/logical-replication.html > > > > > > On Tue, 7 Apr 2026, 5:17=E2=80=AFpm Muhammet Kurto=C4=9Flu, < > muhammet.kurtoglu@bisoft.com.tr> wrote: > > You can use pg_logical extension then > > *Muhammet KURTO=C4=9ELU* > > T: +90(312) 220 12 20 <%2B90%28374%29%20262%2098%2000> > > F: +90(312) 286 00 10 <%2B90%28374%29%20262%2090%2091> > > muhammet.kurtoglu@bisoft.com.tr > > > > > > > > > > > 7 Nis 2026 Sal, saat 10:09 tarihinde akshay chandratre < > akshaychandratre44@gmail.com> =C5=9Funu yazd=C4=B1: > > Hi Muhammet, > > Thanks for suggesting symetricds community. > > Will check that out. But my organization wants something open-source. And > on core postgresql. > > > > On Mon, Apr 6, 2026 at 5:13=E2=80=AFPM Mahendra Singh > wrote: > > Dear Akshay, > > > > The answer is *EDB Postgres Distributed.* > > > > On Mon, Apr 6, 2026 at 11:09=E2=80=AFAM Muhammet Kurto=C4=9Flu < > muhammet.kurtoglu@bisoft.com.tr> wrote: > > Hi, > > You can use symetricds community which resolves conflicts with predefine= d > rules on master master replication > > Best REgards > > > > > > akshay chandratre , 6 Nis 2026 Pzt, 09:25 > tarihinde =C5=9Funu yazd=C4=B1: > > Hi Everyone, > > The client required the multimaster replication on the production > environment. I want help regarding the following things: > 1. How to setup multi-master replication on postgresql ? > 2. How to handle the conflicts regarding the writes on both masters > servers ? > 3. Is it reliable for production ? Any other suggestions or options for > multimaster ? > > Postgresql V18 > Os: centOS > > > > Thanks in advance... > > > > > -- > > *Muhammet KURTO=C4=9ELU* > > T: +90(312) 220 12 20 <%2B90%28374%29%20262%2098%2000> > > F: +90(312) 286 00 10 <%2B90%28374%29%20262%2090%2091> > > muhammet.kurtoglu@bisoft.com.tr > > > > > > > > ------------------------------ > > Notice: This e-mail is intended only for the named person or entity to > which it is addressed and contains valuable business information that is > privileged, confidential and/or otherwise protected from disclosure. > Dissemination, distribution or copying of this e-mail or the information > herein by anyone other than the intended recipient, or an employee, or > agent responsible for delivering the message to the intended recipient, i= s > strictly prohibited. All contents are the copyright property of the sende= r. > If you are not the intended recipient, you are nevertheless bound to > respect the sender's worldwide legal rights. We require that unintended > recipients delete the e-mail and destroy all electronic copies in their > system, retaining no copies in any media. If you have received this e-mai= l > in error, please immediately notify us by returning the e-mail to the > sender. We appreciate your cooperation. > --0000000000008ed11d064eeb69e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
1. Instalar PostgreSQL + BDR
= BDR no viene incluido en PostgreSQL est=C3=A1ndar.
N= ecesitas EDB Postgres Distributed (antes BDR)
Sitio:= EnterpriseDB
2. Configurar par=C3=A1metros (postgre= sql.conf)
Conf
wal_level =3D = logical
max_replication_slots =3D 10
max_wal_senders =3D 10
max_worker_processe= s =3D 20
shared_preload_libraries =3D 'bdr'<= /div>
3. Crear base de datos y habilitar BDR
SQL
CREATE DATABASE mydb;
\c mydb

CREATE EX= TENSION bdr;
4. Crear nodo
SQ= L
SELECT bdr.create_node(
=C2= =A0 node_name :=3D 'node1',
=C2=A0 dsn :=3D = 'host=3DIP_NODE1 dbname=3Dmydb user=3Dpostgres password=3Dxxx'
);
5. Unir segundo nodo
En el segundo servidor:
SQL
SELECT bdr.join_node(
=C2=A0 node_name = :=3D 'node2',
=C2=A0 dsn :=3D 'host=3DIP= _NODE2 dbname=3Dmydb user=3Dpostgres password=3Dxxx',
=C2=A0 join_using_dsn :=3D 'host=3DIP_NODE1 dbname=3Dmydb user=3D= postgres password=3Dxxx'
);
=E2=9C=94=EF=B8=8F Ahora ambos pueden escribir (multi-master)
=
Yekma666

<= div class=3D"gmail_quote gmail_quote_container">
El mar, 7 de abr de 2026, 10:52, Jorge Batista <Jorge.Batista@premier-research.com= > escribi=C3=B3:

PostgreSQL logical replication supports bidirectional setups, b= ut conflict handling is not automated. The documentation itself highlights = that conflicts can arise when multiple nodes accept writes and resolving them is left to the application or design strategy.

=C2=A0

If the requirement is strictly open-source and limited to core = PostgreSQL, the most direct option would be bi-directional logical replicat= ion (native or pglogical).

=C2=A0

That said, PostgreSQL does not provide a fully managed multi-ma= ster solution. In practice, this means:

  • No built-in= conflict resolution (conflicts can stop replication)<= /li>
  • Risk of dup= licate keys / concurrent update issues
  • Sequences n= eed coordination (or UUIDs)
  • DDL is not = automatically replicated
  • Operational= complexity increases significantly

=C2=A0

Because of this, the safest approach is usually to define data = ownership per node (e.g., by tenant or region) to avoid conflicts rather th= an trying to resolve them after the fact.

=C2=A0

Otherwise, pure core PostgreSQL multi-master setups can be diff= icult to operate reliably in production.

=C2=A0

Regards

=C2=A0

From: Rajni Baliyan <saan654@gmail= .com>
Sent: Tuesday, April 7, 2026 4:16 AM
To: Muhammet Kurto=C4=9Flu <muhammet.kurtoglu@bisoft= .com.tr>
Cc: akshay chandratre <akshaychandratre44@gmail.com= >; Mahendra Singh <msmahendrasingh18@gmail.com>; Pgsq= l-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: How to setup Multi-master replication on postgresql 18<= u>

=C2=A0

= EXTERNAL: This email originated from outside of our organization. Do not click links or open attachments u= nless you recognize the sender and know the content is safe.<= /span>

=C2=A0

Hi Muhammet,

You can achieve at certain level multi master replic= ation using postgres native logical replication. Latest version 18 has good= conflict resolution as well.

=C2=A0

On Tue, 7 Apr 2026, 5:17=E2=80=AFpm Muhammet Kurto=C4=9Flu, <= ;muhammet.kurtoglu@bisoft.com.tr> wrote:

You can use pg_logical extension then

Muhammet KURTO=C4=9ELU

T:=C2=A0=C2=A0+90(312) 220 12 20

F:=C2=A0=C2=A0+90(312) 286 00 10

muhammet.kurtoglu@bisoft.com.tr=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0

<= span style=3D"font-size:9.5pt">




=C2=A0

=C2=A0

7 Nis 2026 Sal, saat 10:09 tarihinde akshay chandrat= re <akshaychandratre44@gmail.com> =C5=9Funu yazd=C4=B1:=

Hi Muhammet,

Thanks for suggesting symetricds community.

Will check that out. But my organization wants something open-source. And o= n core postgresql.

=C2=A0

On Mon, Apr 6, 2026 at 5:13=E2=80=AFPM Mahendra Singh <msmahendrasingh18@gmail.com> wrote:

Dear Akshay,

=C2=A0

The answer is EDB Postgres Distributed.=C2=A0=

=C2=A0

On Mon, Apr 6, 2026 at 11:09=E2=80=AFAM Muhammet Kurto=C4=9Flu = <muhammet.kurtoglu@bisoft.com.tr> wrote:

Hi,

=C2=A0You can use symetricds=C2=A0community which re= solves conflicts with predefined rules on master master replication<= u>

Best REgards

=C2=A0

=C2=A0

akshay chandratre <akshaychandratre44@g= mail.com>, 6 Nis 2026 Pzt, 09:25 tarihinde =C5=9Funu yazd=C4=B1:<= /u>

Hi Everyone,

The client required the multimaster replication on the production environme= nt. I want help regarding the following things:
1. How to setup=C2=A0multi-master replication on postgresql ?
2. How to handle the conflicts regarding the writes on both masters servers= =C2=A0?
3. Is it reliable for production ? Any other suggestions or options for mul= timaster ?

Postgresql V18
Os: centOS

=C2=A0

Thanks in advance...


=C2=A0

--

Muhammet KURTO=C4=9ELU

T:=C2=A0=C2=A0+90(312) 220 12 20

F:=C2=A0=C2=A0+90(312) 286 00 10

muhammet.kurtoglu@bisoft.com.tr=C2=A0

=C2=A0=C2=A0=C2=A0=C2=A0







Notice: This e-mail is intended only for the named person or entity to whic= h it is addressed and contains valuable business information that is privil= eged, confidential and/or otherwise protected from disclosure. Disseminatio= n, distribution or copying of this e-mail or the information herein by anyone other than the intended recipie= nt, or an employee, or agent responsible for delivering the message to the = intended recipient, is strictly prohibited. All contents are the copyright = property of the sender. If you are not the intended recipient, you are nevertheless bound to respect the send= er's worldwide legal rights. We require that unintended recipients dele= te the e-mail and destroy all electronic copies in their system, retaining = no copies in any media. If you have received this e-mail in error, please immediately notify us by returning t= he e-mail to the sender. We appreciate your cooperation.
--0000000000008ed11d064eeb69e0--