Slony-I is a "master to multiple slaves" replication system for PostgreSQL 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.

PostgreSQL 9.0 includes streaming replication, which, for a number of use cases, is likely to be simpler and more convenient than Slony-I.

There are, however, three characteristic kinds of cases where you'll need something like Slony-I, where the built-in WAL-based replication won't work:

  • You need to interact between PostgreSQL versions. Slony (and similar systems like Londiste and Bucardo) can cope with having nodes running different versions of PostgreSQL.

    WAL-based replication requires that all databases use identical versions of PostgreSQL, running on identical architectures.

  • You only want to replicate parts of the changes that are going on.

    WAL-based replication duplicates absolutely everything.

  • You need for there to be extra behaviours taking place on subscribers, for instance, populating cache management information.

    WAL-based replication duplicates absolutely everything, and nothing extra that changes data can run on a WAL-based replica.

Steve Singer also discusses the matter in 9.0 Streaming Replication vs Slony .

As observed up front, the streaming replication built into PostgreSQL, which has progressed since its beginnings in version 8.1, can satisfy some users' replication requirements. For those with requirements that are not compatible with its strictures, replication systems like Slony-I will continue to be useful.

2.0.5 fixes more than 24 issues found from 2.0.4 and earlier versions, remedying many issues found during an extensive testing period.

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.

Slony-1 2.1.0 engine documentation
Slony-1 2.0.7 engine documentation
Slony-1 1.2.22 engine documentation
Slony-1 1.1.9 engine
Chris Browne 2011-10-19
The first release for Slony-I branch 2.1 has been released, in the form of version 2.1.0. It is a significant new version, fixing dozens of reported bugs, and adding some significant enhancements, including:
  • Implicit WAIT FOR
  • Support for adding tables in bulk
  • Support for replicating TRUNCATE
  • Health checks at startup
  • Performance improvement in cases of large backlog
  • Monitoring thread to provide better monitoring data
See the release notes for a full list of changes in this release.
2011-10-19
The next minor release of Slony 2.0 is available. Slony 2.0.7 includes a number of bug fixes from the previous release of Slony.
  • Slon can better recover from dropped network connections
  • Bug #193 - vac_count not being reset to 0 was causing vacuums to be done too frequently by the cleanup thread
  • Bug #195 - change slon_quote_* functions to IMMUTABLE
  • Bug #204 - Fix issue with FAILOVER to a non-direct subscriber introduced in 2.0.5
  • Build system fixes including MS Visual C support and no longer requiring pgport on other platforms
  • Bug #217 - Execute script (ddlscript_complete_int) will now reconfigure the trigger arguments on the log trigger for any tables that needs it.
A complete list of changes can be found in the release notes
2011-07-29
The third beta release of 2.1.0 is now available. Significant changes from the second beta include
  • Bug 204 - Additional failover fixes
  • Bug 218 - Changes in obtaining sl_config_lock and sl_event_locks
  • Bug 220 - Fixing order of parameters when reshaping subscribers
  • Bug 222 - Fixing issue where log trigger on new connections can block
2011-07-12

We are proud to announce the release of a new version of slony1-ctl, a collection of shell scripts aiming at simplifying everyday administration of Slony replication.

This version adds better support of localisation and a complete rewritting of functions.

slony1-ctl project homepage

The package

Best regards,

Stéphane Schildknecht

2011-05-31
The second beta release of 2.1.0 is now available. Changes from the first beta include
  • Bug #204 - Upgrade from 2.0.x fails under PostgreSQL 8.3
  • Bug 205 - Upgrade fails from 2.0.0, return type from cloneNode changes
  • Bug 206 - Do not perform an accidental rollback in a try block
  • Bug 208 - Fixing issues with bulk adding of tables.
  • Bug 209 - Default table ID problem
  • Bug 210 - merge set should wait for both sets to be subscribed before submitting the merge event.
  • Bug 211 - Modify the altperl tools so they don't enclose statements that wait for events inside of a 'try' block.
2011-05-27

1.1 Some items without bug numbers:

  • Introduced tests using the clustertest framework, consisting of two sets of tests:
    • clustertest/regression - port of the old tests in the tests directory
    • clustertest/disorder - new simulated order entry system with a fair bit of concurrency
  • Configure and Makefile cleanups and improvements, including
    • Configure looks in common locations for some of the DocBook tooling, so it is less likely to require manual intervention on some common distributions
    • Pick up Groff automagically
    • Script to do virtually all the work documented in the Release Checklist
  • Documentation updates
    • Reorganized sections
    • Trend towards having version-specific documentation, rather than trying to have it document all versions at once
  • Git changes
    • Numerous .gitignore files set up to ignore generated files
  • Add a resetSession function that will reset the session state cached in the C stored functions.

1.3 Items tracked from Bugzilla

  • Bug #79 - –prefix and –exec-prefix options don't function as expected
  • Bug #90 - Builds On Solaris with Sun C Studio fail. This also addresses issues building with Microsoft Visual Studio.
  • Bug #126 - TCP KEEP alives can now be used from slon to postgresql(on by default)
  • Bug #134 - TRUNCATE trigger usage
  • Bug #142 - better document minimal security profile
  • Bug #146 - Removed option to use DELETE to trim sllog* tables - only support TRUNCATE
  • Bug #152 - eliminate debugging statements from DDL processing
  • Bug #156 - add health check at slon startup time
  • Bug #163 - change Slony-I tables to use TIMESTAMP WITH TIME ZONE rather than WITHOUT TIME ZONE
  • Bug #167 - change queries against sllog* tables to avert slowdown when large backlog
  • Bug #170 - remove SNMP support
  • Bug #172 - add support for applicationname GUC (in recent PG such as 9.0)
  • Bug #175 - add monitoring thread which stows activity information in slcomponents
  • Bug #179 - Implicit/Automatic wait for. Slonik will now often perform an automatic 'wait for event' when required to avoid race conditions.
  • Bug #180 - Created a slonik DATE command
  • Bug #181 - Support for bulk adding of tables and sequences and automatically finding the next available table or sequence id.
  • Bug #185 - change functions to use named parameters
  • Bug #187 - add newline to slon PID files
  • Bug #188 - test harness query had subquery returning multiple tuples
  • Bug #189 - add slonik EXIT check for exit values 0..255, as that's all that Unix accepts
  • Bug #193 - add back reset of vaccount so vacuums only done every few cleanup thread iterations
  • Bug #195 - change slonquote* functions to IMMUTABLE
  • Bug #196 - add guard lock on sleventlock to protect against events with XID going backwards
  • Bug #198 - subscribeset() should verify that provider node exists
  • Bug #201 - Allow command-line options to be configured from slontools.conf
  • Bug #204 - Fix issue with FAILOVER to a non-direct subscriber introduced in 2.0.5
2011-05-06
SlonyI 2.0.6 available
The next minor release in the 2.0 stream (2.0.6) has been released.
Steve Singer 2010-12-06
SlonyI 1.2.22 available

The next minor release in the 1.2 branch (1.2.22) has been released.

Steve Singer 2010-12-06
Feature Ideas Solicitation
We're soliciting ideas and discussion about what sorts of things to add to Slony-I. Might be for "2.1", or "3.0", depending on how much things change. Being maintained on PostgreSQL developers wiki at SlonyToDo to enable editing by developer community.
Chris Browne 2010-11-22
Slony-I 2.0.5 available

2.0.5 fixes more than 24 issues found from 2.0.4 and earlier versions, remedying many issues found during an extensive testing period.

The following issues visibly change Slony-I behaviour, and thus warrant extra attention from existing users:

Steve Singer 2010-10-07