11

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.

7 Answers 7

12

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.

Sign up to request clarification or add additional context in comments.

Comments

7

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.

Comments

2

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.

Comments

1

I though Postgres-R looked promising, however, its still in development.

It was supposedly stabilised and purported to be a potential for integration with the standard issue, but its yet to come to fruition.

Comments

1

Late answer but there is a new open source software for asynchronous master-master replication of PostgreSQL (also works for MySQL): rubyrep

Focus is on easy setup. Disclosure: I wrote it.

2 Comments

Its not as simple as it looks, however.
It doesn't seem to be very actively maintained any more, which is a shame.
0

You can have a look at slony.

Comments

0

PGCluster looks promising - we use it in limited situations without much problems.

http://pgfoundry.org/projects/pgcluster/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.