Given two primary PG12 servers, A and B, let's setup logical replication from A to B.
A --> B
Both servers can and do receive writes, and don't use sequences or unique constraints so there is no conflict.
Is it possible to set up replication from B to A, without replicating the data replicated from A?
Writes from A:
A --> B -x-> A
Writes from B:
B --> A -x-> B
End result is both databases have the same data set.
Best Answer
No, that is not possible. Replication cannot be cyclical.
You seem to be looking for a multi-master solution for PostgreSQL, but there are no open source solutions for that.
If I get that right that you have no unique or primary key constraints on the table, logical replication will not do what you want if the table contains duplicate rows.