## 11. Adding Things to Replication

You may discover that you have missed replicating things that you wish you were replicating.

This can be fairly easily remedied.

You cannot directly use slonik SET ADD TABLE or SET ADD SEQUENCE in order to add tables and sequences to a replication set that is presently replicating; you must instead create a new replication set. Once it is identically subscribed (e.g. - the set of providers and subscribers is entirely identical to that for the set it is to merge with), the sets may be merged together using MERGE SET.

Up to and including 1.0.2, there was a potential problem where if MERGE SET is issued while other subscription-related events are pending, it is possible for things to get pretty confused on the nodes where other things were pending. This problem was resolved in 1.0.5.

Note that if you add nodes, you will need to add both STORE PATH statements to indicate how nodes communicate with one another, and STORE LISTEN statements to configuration the “communications network” that results from that. See Section 8, “Slony-I listen paths” for more details on the latter.

It is suggested that you be very deliberate when adding such things. For instance, submitting multiple subscription requests for a particular set in one slonik script often turns out quite badly. If it is truly necessary to automate this, you'll probably want to submit WAIT FOR EVENT requests in between subscription requests in order that the slonik script wait for one subscription to complete processing before requesting the next one.

But in general, it is likely to be easier to cope with complex node reconfigurations by making sure that one change has been successfully processed before going on to the next. It's way easier to fix one thing that has broken than to piece things together after the interaction of five things that have all broken.