README
$Id: README,v 1.13 2005-05-31 16:11:05 cbbrowne Exp $

Christopher Browne, Afilias Canada
Steve Simms, Technically Sound

The altperl scripts provide an alternate method of managing Slony-I,
generating slonik scripts and monitoring slon daemons.  They support
an arbitrary number of Slony-I nodes in clusters of various shapes and
sizes.

To install the scripts, run "make" and "make install" in this
directory.  The files will be installed under the --prefix you passed
to configure.

Enter a complete description of your cluster configuration (both nodes
and sets) in slon_tools.conf.  The provided slon_tools.conf-sample
contains documentation about each of the available options.

If you want to support multiple clusters, you can create multiple
slon_tools.conf files and specify which one to use in any of the
scripts by passing the --config option.


For the impatient: Steps to get started
---------------------------------------

1. From the top-level source directory:

   ./configure --prefix=/usr/local/slony --with-perltools
   make
   make install

2. Dump the schema from one database to another:

   pg_dump --schema-only --host=server1 source_db | psql --host=server2 dest_db

3. Modify /usr/local/slony/etc/slon_tools.conf to reflect your setup.

4. Initialize the Slony-I cluster:

   /usr/local/slony/bin/slonik_init_cluster

   Verify that the output looks reasonable, then run:

   /usr/local/slony/bin/slonik_init_cluster | /usr/local/pgsql/bin/slonik

5. Start up slon daemons for both servers:

   /usr/local/slony/bin/slon_start node1
   /usr/local/slony/bin/slon_start node2

6. Set up set 1 on the "master" node:

   /usr/local/slony/bin/slonik_create_set set1

7. Subscribe node 2 to set 1:

   /usr/local/slony/bin/slonik_subscribe_set set1 node2

After some period of time (from a few seconds to a few days depending
on the size of the set), you should have a working replica of the
tables in set 1 on node 2.


Alternate Configuration Method
------------------------------

The slon_tools.conf file is interpreted by Perl, so you could modify
it to query a database to determine the configuration.  (Beware of
chicken-and-egg scenarios in doing this, however!)


For More Information
--------------------

There are numerous other scripts for maintaining a Slony cluster.  To
learn more about any of them, run "tool_name --help".

See also the Slony-I administration guide in the doc directory.
