PostgreSQL复制策略 [英] PostgreSQL replication strategies

查看:142
本文介绍了PostgreSQL复制策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我们使用PostgreSQL 8.3(在Linux上)作为Ruby on Rails web应用程序的数据库后端。



考虑到在PostgreSQL数据库上,我们主要使用row级别阻止和PL / PGSQL,我们可以使用什么来保护我们的数据 - 我的意思是工具,包,脚本,策略 - 成功复制数据库和构建多主组合?


$ b



例如,如果我把几个应用服务器运行Apache / Ruby来实现更高的性能,端部署多个数据库服务器,是否有任何方法在PostgreSQL中构建多主复制?



现在我们使用PostgreSQL WAL机制将数据备份到文件系统。 p>

非常感谢。

解决方案

从(和主 - 多从)方案,通常基于触发。 Slony-I 已经被提及(是稳定和坚实,但有点难以操作)。 Slony问题的人我写了
Londiste (通过Skype小组)和 PyReplica 。 Bah,我刚刚发现了
Mammoth 已经开源



对于multimaster,有 Bucardo (注意:它不是抛光的)
或商业产品 - 例如续约 Cyber​​Tec


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.

这篇关于PostgreSQL复制策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆