Denish Patel
One of the key features any Enterprise considers when choosing a database technology for their architecture solution stack is that of replication. Oracle and MySQL both have built in replication solutions, but as of yet PostgreSQL doesn't support a built in replication solution. There are many replication solutions available however, and different companies are using different solutions customized for their needs.
Among all of the solutions, Slony is probably the most widely tested and deployed within organizations, although it does have the following limitations:
* Replicated tables must have a unique or primary key
* It does not support replication of large objects
* Schema changes are not propagated (though they can be coordinated)
* It does not support synchronizing databases outside of replication
* There are limitations on version compatability; you can not replicate from PostgreSQL 8.2 to PostgreSQL 8.4 for example
* It is more difficult to set up than many other replication solutions
One new alternative to Slony is a project known as RubyRep, which is designed to avoid some of the limitations of Slony. RubyRep has full stack solution from comparing two databases to start replicating them.
In the talk, I will explore the RubyRep usage with examples for following actions:
- Compare
- Sync
- Replicate
1. Yet Another Replication Tool
RubyRep
/ Denish Patel
Database Architect
Friday, March 26, 2010 1
2. Who am I?
• With OmniTi for more than 3 years
• Manage high traffic database systems
• Replication database system deployments
• Not a core hacker of RubyRep
• “Oh, We are hiring!!”
• Contact : denish@omniti.com
Friday, March 26, 2010 2
3. Next 30 minutes ..
• Replication
• Various Tools
• Slony? Why another tool ?
• RubyRep
• Install
• Features
• Examples
• Tweaking replication policies
Friday, March 26, 2010 3
5. Tools
Program Type Method Based on
PgCluster -II Synchronous M-M Shared Disk
Slony-I Asynchronous M-S Trigger
Bucardo Asynchronous M-M, M-S Trigger
Londiste Asynchronous M-S Trigger
Mammoth Asynchronous M-S Log
RubyRep Asynchronous M-M, M-S Trigger
Friday, March 26, 2010 5
6. Why not Slony?
• Replicated tables MUST need PK or UK
• Doesn’t support large objects
• Doesn’t support synchronizing tables outside of replication
• Limitations of version compatibility
• Difficult to setup
• Doesn’t support Master - Master
• Difficult to monitor and manage
Friday, March 26, 2010 6