PostgreSQL Replication

Short answer – there’s no such solution yet for PostgreSQL if you need online readonly slaves.

There’re two major development projects currently going on in this area which are included in PostgreSQL 9.0 (Spring/Summer 2010), namely:

  • Synchronous Replication:

http://wiki.postgresql.org/wiki/NTT’s_Development_Projects

  • Read only hot standby slaves:

http://wiki.postgresql.org/wiki/Hot_Standby

which in combination aim to achieve the ease of use of MySQL-style replication minus the bugs/issues MySQL has plus the reliability users know from PostgreSQL.

All of this was kicked off by a manifest from the PostgreSQL Core Team in 2008:

http://archives.postgresql.org/pgsql-hackers/2008-05/msg00913.php

The PostgreSQL replication solutions to this day with the largest user base are Slony-I (more expensive for writes, makes schema changes fiddly), WAL shipping/walmgr (Slaves can’t be used online) and pgQ/londiste from Skype/Skytools (more tools/building blocks than a finished solution).

I’ve written a few things on Log Shipping, walmgr and Slony-I, see

http://blogs.amd.co.at/mt/mt-search.cgi?blog_id=1&tag=pgrep&limit=20 for more information.

Leave a Comment