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 Git tree may be found here. There is also a local copy.

The original design document is available here.

Slony-I source code has been migrated to use Git.

There are several addresses at which one may get at the repository via the various protocols that Git supports:

  • git://git.postgresql.org/git/slony1-engine.git
  • http://git.postgresql.org/git/slony1-engine.git
  • ssh://git@git.postgresql.org/slony1-engine.git

At present, we do not have a way to automatically send email out when changes are committed (as was the case with CVS). There is, however, an automatically generated RSS feed .

This release of the 2.0.x stream includes fixes to the issues introduced in 2.0.3. 2.0.3 installations are encourged to upgrade.

Please use Slony-I 2.0.4.

See the "news" area for more details. This release fixes many issues from earlier 2.0 versions

Slony-1 2.0.4 engine documentation
Slony-1 1.2.21 engine documentation
Slony-1 1.1.9 engine
Chris Browne 2008-09-12
The migration to use Git. is complete.

A repository at git.postgresql.org has been set up, and populated with code formerly in the slony1-engine CVS repository.

Chris Browne 2010-07-15
The migration to use Git. has begun.

A repository at git.postgresql.org has been set up. It is presently empty; we expect to fill it in on 2010-07-15 with the data presently available in CVS.

Chris Browne 2010-07-14
The next release in the 2.0 series is now ready.
  • Fixed script syntax error, bug #108
  • memory corruption with large rows (introduced in 2.0.3)
  • Memory leak fixes
  • Various Documentation updates
  • Support for newer versions of flex
  • Fixes to stored procedures called by CLONE NODE FINISH (bug #119)
Steve Singer 2010-06-24
The next minor release of the Slony1 1.2 branch (1.2.21) has been released
  • Bug #108 - remove Emacs fodder from test scripts
  • Bug #110 - some quoting problems in Perl script
  • Free objects to eliminate memory leaks
  • Bug #55 - cannot use va_args multiple times + test case with very large tuple
  • SPI_getbinval() fix for PostgreSQL 9.0 support
  • Add buffer for pid
  • Change "long long" to "int64" to make things consistent with how PostgreSQL expresses XIDs.
  • Similarly "%lld" in printf changed to INT64_FORMAT
  • slony1_extract_schema.sh checks Pg version numbers
  • Added tools/slony1_extract_for_upgrade.sh script
Steve Singer 2010-04-09
Slony-I 2.0.3 is now available. It makes the following changes since 2.0.2
  • Bug #103 - When adding snapshot entries, they should be "1:1:", not "0:0:"
  • autoconf/C funcs change to cope with 8.5 change that ScanKeywordLookup has 3 arguments rather than 1 (in previous versions)
  • Remove Emacs fodder from tools (bug #108)
  • Quoting problems in Perl script (bug #110)
  • Add notes about flex/bison conflict (bug #109)
  • Memory leak changes per Ulrich Weber
  • Logic error (if versus "else if") noticed by Richard Yen
  • Bug #106 - misleading error message when setting up session configuration
  • Improve test harness to report conninfo in case where connection fails
  • Bug #55 - va_args cannot be used multiple times
  • Bug # 113 - DROP cloneNodePrepare since the return type changes. Patch from Atte Peltomäki
  • Improve configure complaint if it can't find PQunescapeBytea - this likely implies that configure couldn't find libpq.
  • Copyright date changes
  • Added discussion of synchronous commit to documentation
  • Removed some discussion of behaviours relating to ancient versions of PostgreSQL that are no longer supported (David Fetter)
  • SPI_getbinval() was being passed a NULL, which PostgreSQL 8.5 no longer accepts. Add isnull variable in the relevant code block so there's a place to stow the bool result.

    Reason for this noted by Alvaro Herrera - thanks!

  • Change "long long" to "int64" to make things consistent with how PostgreSQL expresses XIDs.
  • Similarly "%lld" in printf changed to INT64_FORMAT
  • Fixing up detection by Slonik of PostgreSQL 8.4 (patch per Peter Eisentraut) - bug #116
  • 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
  • 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
  • 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 2010-04-09

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
Chris Browne 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
2009-10-14 http://main.slony.info/downloads/1.2/source/slony1-1.2.17-rc.tar.bz2
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