0

I have created two publications one on each PostgreSQL instance but on the same table. Then I subscribed to these publications from each instance. I didn't see an error in the logs of two instances but I can see replication works on one side i.e. uni-directional.

Does logical replication support bi-directional or not?

Thanks

CrazyCoder
  • 2,465
  • 8
  • 36
  • 57

1 Answers1

1

No, you cannot use logical replication to replicate the same table in both directions. This would necessitate complicated conflict resolution, which PostgreSQL doesn't have at the moment.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • Since subscribing to multiple publications for the same table works provided each publication is having unique keys(like primary, constraints, etc), I thought even bidirectional will work. So now I think, I have to use BDR. Thanks for your response. – CrazyCoder Apr 19 '21 at 11:42