Christopher Browne cbbrowne
Wed Sep 14 23:00:44 PDT 2005
Robert Bernier wrote:

>What are the issues, of adding tables to a set using the "set add table" but 
>NOT "set add sequence" for sequences that the tables use such as for example 
>serial data-types i.e. the sequences are already created and initialized to 
>the correct value for each and every node?
>  
>
If you don't add the sequence in, then if you subsequently switch the
origin to a new node, it won't know about the sequence updates, and will
presumably imagine it should start numbering things somewhere earlier.

You'll start seeing primary key violations in cases where the sequence
is used to populate a PK field.

The "danger" case is where a sequence is used in a more subtle fashion
such as to refer to some sort of common across-multiple-tables
transaction ID.  We once ran into a case where a sequence of that sort
was handled wrongly and it caused a veritable plague of billing problems
as unrelated transactions started linking to one another :-(.


More information about the Slony1-general mailing list