Andreas Kostyrka andreas at kostyrka.org
Tue May 1 00:07:10 PDT 2007
* Bill Willits <bwillits at cox.net> [070501 08:28]:
>    Is it necessary to replicate sequences that are tied to table columns?
>    Or, does having the table as part of the replicated set sufficient to keep
>    the sequence-dependant data in sync.

Well, you need to add the sequences to the replication set explicitly.
You can do that any time, and you don't need it from the start
(meaning you can easily fix it).

What happens if you don't do? Slony doesn't update the sequence
values. Everything works fine, because on the slave nodes, slony
inserts complete rows, so test1_id_seq is never used. Now, when you
switch master nodes to one of the backups, you've got a problem => on
the first insert you'll get a "unique constraint error on test1_pkey".

Andreas


More information about the Slony1-general mailing list