Slony-I 1.2.0 Documentation | ||||
---|---|---|---|---|
Prev | Fast Backward | Fast Forward | Next |
When upgrading Slony-I, the installation on all nodes in a cluster must be upgraded at once, using the slonik command UPDATE FUNCTIONS.
While this requires temporarily stopping replication, it does not forcibly require an outage for applications that submit updates.
The proper upgrade procedure is thus:
Stop the slon processes on all nodes. (e.g. - old version of slon)
Install the new version of slon software on all nodes.
Execute a slonik script containing the command update functions (id = [whatever]); for each node in the cluster.
Start all slons.
The trickiest part of this is ensuring that the C library containing SPI functions is copied into place in the PostgreSQL build; the easiest and safest way to handle this is to have two separate PostgreSQL builds, one for each Slony-I version, where the postmaster is shut down and then restarted against the "new" build; that approach requires a brief database outage on each node.
While that approach has been found to be easier and safer, nothing prevents one from carefully copying Slony-I components for the new version into place to overwrite the old version as the "install" step. That might not work on Windows™ if it locks library files that are in use.