Selective logical replication - Mailing list pgsql-hackers

From konstantin knizhnik
Subject Selective logical replication
Date
Msg-id 81E39AF3-FF55-4F65-88D6-05D14E35EBE5@postgrespro.ru
Whole thread Raw
Responses Re: Selective logical replication  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Re: Selective logical replication  (Michael Paquier <michael.paquier@gmail.com>)
Re: Selective logical replication  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Hi,

I want to use logical replication for implementing multimaster (so all nodes are both sending and receiving changes).
But there is one "stupid" problem: how to prevent infinite recursion and not to rereplicate replicated data.
I.e. node receives change set from some other node, applies it within some transaction, it is  written to the log and
...is replicated to other nodes. 
In my experiments with receiver_raw/decoder_raw infinite recursion actually doesn't happen because unique constraint
violation.
But it is neither nice, neither efficient way of stopping infinite recursion.

I wonder if there is some better way to prevent some particular transaction from been replicated?

Thanks in advance,
Konstantin




pgsql-hackers by date:

Previous
From: Erik Rijkers
Date:
Subject: Re: warning: HS_KEY redefined (9.5 beta2)
Next
From: Amit Kapila
Date:
Subject: Re: [DESIGN] ParallelAppend