[Bucardo-general] Replicating Tables the Rely on Sequences
Ben Allen
bsa at lanl.gov
Wed Oct 3 17:16:11 UTC 2007
Is there a more graceful way to use sequences in a "swap" replication
then having the sequence on the second database start at a different
number then the first?
In other words, for this table:
CREATE TABLE item (
id bigserial CONSTRAINT item_pkey PRIMARY KEY,
description varchar(128) NOT NULL
);
On the second database run the following:
ALTER SEQUENCE item_id_seq RESTART 4611686018427387904;
ALTER SEQUENCE item_id_seq MINVALUE 4611686018427387904;
While the first database's sequence starts at one.
Regards,
Ben Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20071003/ce19805d/attachment.html
More information about the Bucardo-general
mailing list