Bucardo
From PostgreSQL wiki
Contents |
Overview
Bucardo is a replication system for Postgres that provides both master-master and master-slave capabilities. It is asynchronous and trigger based. Its primary goals are to provide master-master replication for load balancing and failover, and to provide load balancing and data warehousing via master-slave replication.
Status
Production Version 4.4.0
Contacts
General Information
| Scalability | Master-slave: high with cascading slaves. Multi-master: two masters only |
| Read scaling | yes |
| Write scaling | yes (with multimaster); no/slight inverse (master/slave only) |
| Triggers/procedures | Yes |
| Parallel query | No |
| Failover/High Availability | Not automatic |
| Online provisioning | No |
| PostgreSQL upgrades | Yes |
| Detached node/WAN | Yes |
| PostgreSQL core modifications required | No |
| Programming languages | Perl, Pl/PgSQL, Pl/PerlU |
| Licensing | BSD |
| Complete clustering solution | Yes |
| PostgreSQL versions | 8.1 to 9.0 |
Clustering model
Asynchronous cascading master-slave replication, row-based, using triggers and queueing in the database AND Asynchronous master-master replication, row-based, using triggers and customized conflict resolution
General model: Asynchronous cascading master-slave and/or master-master. Row-based, uses triggers and LISTEN/NOTIFY.
Bucardo requires a dedicated database and runs as a Perl daemon that communicates with this database and all other databases involved in the replication. It can run as multimaster or multislave.
Multimaster replication is limited to two databases, with conflict resolution (either standard choices or custom subroutines) to handle the same update on both sides.
Master-slave replication involves one master going to one or more slaves.
Chaining is possible, such the server A and B can be set as multimaster, and B can also be a master to the slaves C, D, and E, while E in turn can be the master for slaves F, G, and H.
Use-case
- Load balancing via slaves
- Data warehousing via slaves
- Slaves are not constrained and can be written to
- Upgrading from one Postgres version to another
- Many hooks allow for data to be changed on the fly during replication, and ease of things like cache invalidation.
- Partial replication
- Replication on demand (changes can be pushed automatically or when desired)
- Will handle replication of TRUNCATE for Postgres version 8.4 or greater.
- Slaves can be "pre-warmed" for quick setup
Drawbacks
- Cannot handle DDL (Postgres has no triggers on system tables)
- Cannot handle large objects (same reason)
- Cannot incrementally replicate tables without a unique key (it can "fullcopy" them)
- Will not work on versions older than Postgres 8
Project Sponsors
Support
Commercial support is available from End Point Corporation. Non-commercial support is available from the the bucardo-general mailing list, and the #bucardo channel on irc.freenode.net.
