postgresql 中的多主复制
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19657514/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Multi master replication in postgresql
提问by n j
Can someone guide me to do multi-master replication with PostgreSQL.
有人可以指导我使用 PostgreSQL 进行多主复制。
I have done master-slave replication but how do I get master-master replication.
我已经完成了主从复制,但是如何获得主从复制。
I have tried to use pg-pool-II but I couldn't find any good documentation for it.
我曾尝试使用 pg-pool-II,但找不到任何好的文档。
Let me know what can I do to achieve master-master replication in PostgreSQL. thanks.
让我知道如何在 PostgreSQL 中实现 master-master 复制。谢谢。
回答by alexius
It's very difficult to make real multi-master replication on PostgreSQL. There was no good solutions. May be you don't really need master-master replication and there is a room for vertical scaling (better disk system, more CPUs, more memory).
在 PostgreSQL 上进行真正的多主复制是非常困难的。没有很好的解决方案。可能你真的不需要主-主复制,并且有垂直扩展的空间(更好的磁盘系统,更多的 CPU,更多的内存)。
But if you want to do this I'd recommend to have a look at PostgreSQL-XC, looks like it's stable now.
但是如果你想这样做,我建议你看看PostgreSQL-XC,它现在看起来很稳定。
回答by aleroot
As far as I know you need a third party solution like Bucardoto perform a multi master replication in PostgreSQL.
据我所知,您需要像Bucardo这样的第三方解决方案来在 PostgreSQL 中执行多主复制。
Take a look at this tutorialfor an example of configuring Bucardo and PostgreSQL for a multi master replication.
查看本教程,了解为多主复制配置 Bucardo 和 PostgreSQL 的示例。