问题描述
现在,我们使用PostgreSQL 8.3(在Linux上)作为数据库后端到Rails Web应用程序上的Ruby.
考虑到在PostgreSQL数据库中,我们积极使用行级阻塞和PL/PGSQL,我们可以采用什么来保护我们的数据(我的意思组合?
我也会赞赏主奴隶的建议.
例如,如果我放置了运行Apache/Ruby的几个应用程序服务器以实现更高的性能,并且最终部署了几个数据库服务器,是否有任何方法可以在PostgreSQL中构建多主机复制?
现在,我们使用PostgreSQL WAL机制备份数据到文件系统.
非常感谢.
推荐答案
有一些用于主奴隶(和Master-Multislave)方案的工具,通常是基于触发的. slony-i 已经提到过(稳定且坚固,但有点难以操作).我在Slony-我写的问题写道 /www.nsis.com.ar/public/wiki/pyreplicaen" rel =" noreferrer"> pyreplica . bah,我只是发现了 猛mm象已开放源
对于多主管有 bucardo (注意:不是那么抛光) 或商业产品 - 例如,作者:连续或 cybertec .
其他推荐答案
如果您尚未,我建议您看看高可用性,负载平衡和复制 PostgreSQL手册的章节.它清楚地概述了可用的技术及其功能.
其他推荐答案
hm, bucardo 与这里的其他人相比,确实很好且稳定.它是一个基于Perl的复制系统的抛光,并支持Master-Slave和Multi-Master Replication,并具有有趣的冲突解决概念.
如果您需要简单的主奴隶代表,我会推荐Londiste,但是对于多主机需求,Bucardo是唯一可接受的解决方案.
问题描述
Right now we are using PostgreSQL 8.3 (on Linux) as a database backend to our Ruby on Rails web application.
Considering that on PostgreSQL database we actively use row level blocking and PL/PGSQL, what can we employ to secure our data -- I mean tools, packages, scripts, strategies -- to successfully replicate the database and build multi-master combination?
I will appreciate master-slave suggestions as well.
For example, if I put several application servers running Apache/Ruby to achieve higher performance and at the end deploy several database servers, is there any way to build multi-master replication in PostgreSQL?
Right now we use PostgreSQL WAL mechanism to backup data to file system.
Thanks a lot.
推荐答案
There are a few tools for master-slave (and master-multislave) scenarios, usually trigger-based. Slony-I has already been mentioned (is stable and solid, but a bit difficult to operate). People having problems with Slony-I wrote Londiste (by Skype team) and PyReplica. Bah, and I just spotted Mammoth has been open-sourced
For multimaster there is Bucardo (note: it is not that polished) or commercial offerings - for example by Continuent or CyberTec.
其他推荐答案
If you haven't already, I'd suggest a look at the High Availability, Load Balancing, and Replication chapter of the PostgreSQL manual. It gives a clear overview of the available techiques and their features.
其他推荐答案
Hm, Bucardo is really good and stable, in comparison to the others here. It is as polished as can be a Perl-based replication system, and supports master-slave as well as multi-master replication, with interesting conflict resolution concepts.
If you need simple master-slave rep I'd recommend Londiste, but for the multi-master needs, Bucardo is the only acceptable solution IMHO.