简体   繁体   English

PostgreSQL 多主同步

[英]PostgreSQL Multi master Synchronisation

I have a scenario as follows,我有一个场景如下,

  1. One cloud server is running an application with PGSQL as DB一台云服务器正在运行一个以 PGSQL 作为 DB 的应用程序
  2. Multiple local servers are running with same application with PGSQL as DB多个本地服务器使用相同的应用程序运行,PGSQL 作为数据库
  3. User may access the cloud server for read/write data用户可以访问云服务器读取/写入数据
  4. User may access any of the local server to read/write data用户可以访问任何本地服务器来读/写数据

What I need is synchronisation between all these databases.我需要的是所有这些数据库之间的同步。 The synchronisation can be done live if connectivity is available, or immediately when connectivity is available.如果连接可用,同步可以实时完成,也可以在连接可用时立即完成。

Please guide me with some inputs, where can i start from.请指导我一些输入,我可以从哪里开始。

Rethink your requirements.重新考虑您的要求。

Multimaster replication is full of pitfalls, and it is easy to get your databases out of sync unless you plan carefully.多主复制充满陷阱,除非您仔细计划,否则很容易使您的数据库不同步。 You'd probably be better off with a single master node.使用单个主节点可能会更好。

That said, you could look at BDR by 2ndQuadrant which provides such functionality.也就是说,您可以通过提供此类功能的 2ndQuadrant 来查看 BDR。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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