Provided by: slony1-doc_1.2.15-1_all bug
 

NAME

        MERGE SET - Merge Slony-I replication sets together
 

SYNOPSIS

        MERGE SET (options);
 

DESCRIPTION

        Merge  a set of tables and sequences into another one. This function is
        a workaround for the problem that it is not possible to add  tables/se‐
        quences to already-subscribed sets. One may create a temporary set, add
        the new objects to that, subscribe all nodes  currently  subscribed  to
        the  other set to this new one, and then merge the two together, elimi‐
        nating the set ID that was being added.
 
        This operation will refuse to be run if the two sets do not have exact‐
        ly the same set of subscribers.
 
        ID = ival
               Unique  ID  of  the set to contain the union of the two separate
               sets.
 
        ADD ID = ival
               Unique ID of the set whose objects should be transferred.
 
        ORIGIN = ival
               Current origin node for both sets.
 
        This uses “schemadocmergeset( integer, integer )” [not available  as  a
        man page].
 

EXAMPLE

             # Assuming that set 1 has direct subscribers 2 and 3
             SUBSCRIBE SET (ID = 999, PROVIDER = 1, RECEIVER = 2);
             SYNC (ID=1);
             WAIT FOR EVENT (ORIGIN = 1, CONFIRMED = 2, WAIT ON=1);
             SUBSCRIBE SET (ID = 999, PROVIDER = 1, RECEIVER = 3);
             SYNC (ID=1);
             WAIT FOR EVENT (ORIGIN = 1, CONFIRMED = 3, WAIT ON=1);
             MERGE SET ( ID = 1, ADD ID = 999, ORIGIN = 1 );
        No application-visible locking should take place.
        Merging takes place based on the configuration on the origin node. If a
        merge is requested while subscriptions are still being processed,  this
        can  cause in-progress subscribers’ replication to break, as they’ll be
        looking for configuration for this set which the merge request deletes.
        Do not be too quick to merge sets.
        This  command  was introduced in Slony-I 1.0.5. In 1.2.1, a race condi‐
        tion was rectified where the merge request  would  be  submitted  while
        subscriptions were still in process on subscribers; it refuses to merge
        before subscriptions are complete.
 
                                17 November 2008                   MERGE SET(7)