简体   繁体   中英

multi Master Replication in Postgres

I am trying to implement multi master replication in Postgres. I read some article and I found several solutions

https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling

In this documentation, I think 'Bi-Directional Replication' is best. Does anyone know more about this?

Most people who think they need multi-master replication, don't, and are better off with active/standby failover systems. Look into repmgr and related tools.

If you want to deploy a multi-master system, be prepared to understand concepts like the CAP theorem and PACELC . For a system like BDR you will to understand asynchronous replication conflicts, the implications of transactions running on different nodes without distributed locking and distributed snapshots, etc.

There are major advantages to running a multi-master system like BDR, but it's not simple. It's usually something you should plan to migrate to when you need to. Not before. Expect to need to modify your application. You will need to validate how your app interacts with the DB and likely change some logic to be tolerant of conflicts.

There is no simple, one-size-fits-all answer to your question. You could write a book on it and still not be done. It depends a lot on your specific requirements and application... and how practical those requirements actually are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM