Slony-I is a "master to multiple slaves" replication system supporting cascading (e.g. - a node can feed another node which feeds another node...) and failover.

The big picture for the development of Slony-I is that it is a master-slave replication system that includes all features and capabilities needed to replicate large databases to a reasonably limited number of slave systems.

Slony-I is a system designed for use at data centers and backup sites, where the normal mode of operation is that all nodes are available.

A fairly extensive "admin guide" comprising material in the CVS tree may be found here. There is also a local copy.

The original design document is available here.

See the "news" area for more details, including a copy of the release notes. This version fixes quite a number of issues found in early use of version 2.0.

See the "news" area for more details, including a copy of the release notes. This version fixes issues relating to FAILOVER.

Source RPMs (SRPMs) are available

See the "news" area for more details, including a copy of the release notes. This version fixes quite a number of issues found in early use of version 2.0.0.

See the "news" area for more details, including a copy of the release notes.

This is a major new release of Slony-I; it makes use of some features introduced in PostgreSQL 8.3, and hence is not compatible with versions older than 8.3.

This is considered a pretty good tradeoff, as various functionality would not be possible with earlier versions of PostgreSQL.

  • Internal catalogues are no longer "hacked with," so that you may, with the new version, use pg_dump against subscribers and be able to expect to have a complete and consistent dump.
  • Trigger handling is enormously cleaner.

Unfortunately, it needs to be noted that there is not, as of yet, an upgrade procedure to upgrade an installation of Slony-I 1.2.x to 2.0. At present, upgrading to 2.0 will essentially require dropping out replication and recreating it.

We hope to have an answer as to how to deal with this in the new year.

Follow Bug #69 for more details on this.

Version 1.2.15 is now available. See the "news" area for more details, including a copy of the release notes.

Slony-1 2.0.2 engine documentation
Slony-1 1.2.20 engine
Slony-1 1.1.9 engine
Chris Browne 2008-09-12

Release 1.2.20 has the following changes:

  • Fix problem with logging where vsnprintf would, with very large output, clobber the byte after malloc()ed output
  • Change "long long" to "int64"
Yes, that's a rapid series of changes :-(
Chris Browne 2009-12-09

Release 1.2.19 has the following changes:

  • Fix problems with drop_if_exists()
  • Add tests to duct tape tests that bump event numbers to test 2^31 "rollover" issue, and to run UPDATE FUNCTIONS
Chris Browne 2009-12-09

Release 1.2.18 has the following changes:

  • autoconf change + change to src/backend/slony1_funcs.c to accomodate change in # of arguments for ScanKeywordLookup in PostgreSQL 8.5
  • Reloading of functions needs to have an emulation of "DROP FUNCTION IF EXISTS" because a couple of functions have had their return value type changed, which doesn't fit happily into CREATE OR REPLACE FUNCTION.
  • Revisions to copyright notices to indicate 2009
  • Fixing 8.4ism in SUBSCRIBE SET process - see change in CVS
Chris Browne 2009-12-01
Version slony1-2.0.3-rc3.tar.bz2 has been made available.

This fixes several things since the previous RC:

  • Updates to copyright dates on files
  • Bug #98 - need WAIT ON parameter in slonik code generated by slonik_move_set altperl script.
  • Change default $LOGDIR, so that distros won't need to patch it.
  • Fix LOG_NAME_SUFFIX feature. Thanks to David Fetter and Andrew Dunstan.
  • Improve documentation on EVENT NODE for STORE NODE command
  • SLONLOG directory changes for Red Hat-related distributions
  • Bug #97 - insert into sl_setsync upon FAILOVER had values() clause based on the pre-2.0 schema; fix to use 2.0.
  • UPGRADE FUNCTIONS failing because functions had their return types changed. Added in "DROP FUNCTION IF EXISTS" (fine in 8.3+) in src/backend/slony1_funcs.sql to rectify this.
  • As observed by Bernd Helmle, cloneNodePrepare returns an event ID, and hence should return BIGINT
  • Introduced ShouldSlonyVacuumTable() function for 8.3 so we cope with differences in vacuum handling between 8.3 and 8.4+
  • Fix 8.4-ism relating to subscription retries see commit notes
Chris Browne 2009-11-20
Version slony1-1.2.17.tar.bz2 has been made available.

Changes since 1.2.16 are as follows:

  • Apply changes to logshipper that went into the 2.0 branch but not 1.2
  • Change minimum debugging level to -1 to allow suppressing logging
  • Bug #92 - compression of event numbers had a bug where events > 2^31-1 would overflow the "int" value
  • Fix to race condition where file descriptor copies were being made at the wrong time in the scheduler
  • Fix return types to use bigint when returning event #'s
  • Establish compatibility with PostgreSQL 8.4:
    • autovac data is on pg_class rather than pg_autovacuum
    • Need to use GetActiveSnapshot() rather than expecting to have SerializableSnapshot in the backend
    • createdb needs to copy from template0 to ensure it can match locales
    • pg_class.reltriggers no longer exists in 8.4 and thus shouldn't be touched
Chris Browne 2009-10-14
Version slony1-2.0.3-rc2.tar.bz2 has been made available.

This fixes a number of things since the previous RC:

  • Doc fixes
  • Fixes to integer castings - don't assume this is automagically handled
  • Changed return types of functions returning event numbers bigint
  • Fixes to altperl samples and such
Chris Browne 2009-08-12
Version slony1-2.0.3-rc.tar.bz2 has been made available.

Changes since 2.0.2 are as follows:

  • PostgreSQL 8.4 has been released; slonik needs to explicitly recognize it
  • Add in slonikconfdump.sh tool, which generates a slonik script to duplicate the configuration of a Slony-I cluster
  • Significant fixes to documentation to reflect 2.0 changes
  • Add "OMIT COPY" option to the Slonik "SUBSCRIBE SET" command
  • Document process for Slony-I 2.0 upgrade using OMIT COPY option
  • Fix to race condition where file descriptor copies were being made at the wrong time in the scheduler
  • Modify "testseqnames" regression test to create a whole bunch of sequences to validate that things don't break down with either lots of them, or where IDs are large numbers
  • Change minimum debugging level to -1 to allow suppressing logging
  • Bug #92 - compression of event numbers had a bug where events > 2^31-1 would overflow the "int" value
  • Autovacuum handling changes in PostgreSQL 8.4 - we pull metadata from pg_class.reloptions, instead of pg_autovacuum
  • logswitch fix resolving a potential data loss + statement blocking bug... Before attempting to TRUNCATE the sl_log_* tables, we need to successfully request an exclusive lock. By doing so in an exception block with NOWAIT option, this can "lose" gracefully.
  • Add LOG_NAME_SUFFIX to altperl tools
Chris Browne 2009-07-29
Updated the online documentation to reflect version 2.0.2; there have been material changes to the docs since 2.0.1.
Chris Browne 2009-07-14
Version slony1-2.0.2.tar.bz2 has been released.

Changes since 2.0.1 are as follows:

  • PostgreSQL 8.4 compatibility - src/backend/slony1_funcs.c needed to #include "catalog/pg_type.h"; that is no longer implicitly included by the SPI #include
  • Fix bug #71 - config dump was failing on string entries that were NULL
  • Fix bug #76 - REPAIR CONFIG could have collisions where, when we load a schema, one entry in sl_table already has an OID value that incorrectly matches a value that another update is trying to fix.

    This would cause REPAIR CONFIG to fail.

    Put in a query that updates the oids in sl_table and sl_sequence to randomly selected values from pg_class that couldn't match (since the values selected are from non-table/non-sequence objects)

  • Updated release notes to indicate that 2.0 only supports PostgreSQL 8.3+
  • Change to configure.ac to allow it to run on autoconf 2.63; there was something unsuitable about SLONREL_VERSION processing
  • Fixes to Makefile for admin guide
  • Various fixes to admin guide material
  • Added an extra test to Schema name test that validates that things can operate properly even if the DB lacks a "public" schema
  • Fixed bug in tools/start_slon.sh
  • Fixed pathname substitutions in a couple of altperl scripts
  • Add a test which validates that the cluster schema name is valid; pgAdminIII allowed setting up cluster names that slonik would refuse to connect to.
  • Revised regression tests to use SYNC/WAIT FOR EVENT instead of queries that try to coordinate sl_status information with rather less determinacy...
Chris Browne 2009-05-08
Version slony1-1.2.16.tar.bz2 has been released. Changes since 1.2.15:
  • Fix problems with failover:
    • Failover would fail (ERROR) where there is no path to backup node - change this to a WARNING so that failover can complete; admin will need to fix up paths later
    • Failover apparently never supported failing over to nodes that were not directly subscribing to the failed node Fixed some broken logic in failedNode()
    • Fixed a problem where slonik cannot perform a failover if multiple origins fail at once.
  • Fixed autoconf 2.63 incompatibility
  • Draw in latest documentation updates from 2.0 branch
Chris Browne 2009-05-08