Bucardo

From PostgreSQL wiki

Jump to: navigation, search

Contents

Overview

Bucardo is a replication system for Postgres that supports any number of sources and targets (aka masters and slaves). It is asynchronous and trigger based.

Status

Production Version 5.0.0

Contacts

General Information

Scalability Master-slave: high with cascading slaves. Multi-master: two or more
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.3

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 uses two or more databases, with conflict resolution (either standard choices or custom subroutines) to handle the same update on both sides.

Master-slave replication involves one or more sources going to one or more targets. The source must be PostgreSQL, but the targets can be PostgreSQL, MySQL, Redis, Oracle, MariaDB, SQLite, or MongoDB.

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.

Other Information

Other Information

Personal tools