6.3. Testing Slony-I State

6.3.1. test_slony_state

In the tools directory, you will find Section 5.1.1 scripts called test_slony_state.pl and test_slony_state-dbi.pl. One uses the Perl/DBI interface; the other uses the Pg interface.

Both do essentially the same thing, namely to connect to a Slony-I node (you can pick any one), and from that, determine all the nodes in the cluster. They then run a series of queries (read only, so this should be quite safe to run) which examine various Slony-I tables, looking for a variety of sorts of conditions suggestive of problems, including:

Running this once an hour or once a day can help you detect symptoms of problems early, before they lead to performance degradation.

6.3.2. Replication Test Scripts

In the directory tools may be found four scripts that may be used to do monitoring of Slony-I instances:

6.3.3. Other Replication Tests

The methodology of the previous section is designed with a view to minimizing the cost of submitting replication test queries; on a busy cluster, supporting hundreds of users, the cost associated with running a few queries is likely to be pretty irrelevant, and the setup cost to configure the tables and data injectors is pretty high.

Three other methods for analyzing the state of replication have stood out: