Move a sequence from one slony-i replication set to another
SET MOVE SEQUENCE (options); \kx
Change the set a sequence belongs to. The current set and the new set must originate on the same node and subscribed by the same nodes.
Due to the way subscribing to new sets works make absolutely sure that the subscription of all nodes to the sets is completely processed before moving sequences. Moving a sequence too early to a new set causes the subscriber to try and add the sequence already during the subscription process, which fails with a duplicate key error and breaks replication.
\*(T<ORIGIN = ival \*(T>
Origin node for the set. A future version of slonik might figure out this information by itself.
\*(T<ID = ival \*(T>
Unique ID of the sequence.
\*(T<NEW SET = ival \*(T>
Unique ID of the set to which the sequence should be moved.
This uses “schemadocsetmovesequence(p_new_set_id integer, p_seq_id integer)” [not available as a man page].
\*(T<SET MOVE SEQUENCE ( ORIGIN = 1, ID = 20, NEW SET = 3 ); \*(T>
No application-visible locking should take place.
Slonik waits for the command submitted to the previous event node to be confirmed on the specified event node before submitting this command.
This command was introduced in Slony-I 1.0.5