Christopher Browne cbbrowne at ca.afilias.info
Fri Feb 20 13:58:29 PST 2009
"=?UTF-8?B?TWFydMOtbiBNYXJxdcOpcw==?=" <martin.marques at gmail.com> writes:
> Maybe a stupid question, but I can't find the info in the documentation.
>
> When I add tables that have PK defined to a replication set, are the
> sequnces of SERIAL PKs replicated as well, or do I have to add them to
> the set?

You need to add them to a replication set, otherwise they will not be
replicated.

> Also, what's the meaning of table_id and sequence_id in SLONY_SETS in
> slon_tools.conf?

This indicates where the in-Slony identifiers for tables and sequences
starts its count.

If you see docs for SET ADD TABLE and SET ADD SEQUENCE...
http://slony.info/adminguide/slony1-1.2.13/doc/adminguide/stmtsetaddtable.html
http://slony.info/adminguide/slony1-1.2.13/doc/adminguide/stmtsetaddsequence.html

One of the parameters to those commands is the "ID".  That is a
unique-across-the-replication-cluster identifier for the table or
sequence.

slon-tools assigns values for these via a counter; by default,
starting at 1 is usually a reasonable idea.

If you are adding *additional* tables or sequences, at some later
time, you'll need to change the starting point, otherwise the slonik
code that is generated will try to do SET ADD TABLE (ID = 1, ...),
which would fail because there's already a table with ID=1.
-- 
let name="cbbrowne" and tld="linuxfinances.info" in name ^ "@" ^ tld;;
http://linuxfinances.info/info/multiplexor.html
Signs  of  a Klingon  Programmer  #10:  "You cannot  really appreciate
Dilbert unless you've read it in the original Klingon."


More information about the Slony1-general mailing list