Orange is my favorite color

I shy away from database replication because it tends to require a lot of monkeying around with complex systems to get it working right. Postgres has a simple log shipping feature but you can’t query the warm standby while other replication tools give you all kinds of option for synchronous vs. asynchronous and multi-master, master-slave, etc.

Enter RubyRep, a Ruby-based replicator that already supports both Postgres and MySQL and has plans to also support Microsoft SQL Server, Oracle and IBM. The author has published a screencast where he enables and demonstrates working replication in less than 5 minutes.

It handles composite primary keys, single primary keys, sequences/uniqueids and even tables without primary keys with a touch of configuration. It works using triggers which it installs and maintains automatically. There are some limitations with MySQL since it only supports one trigger per table which could collide with an existing application trigger. We’ll have to see what performance is like but it’s pretty compelling so far.

Postgres 8.4 RC1 is out too – might be a good opportunity to roll out a test environment and start playing.

Comments are closed.