Ok. Thanks. Do I have to run this commands for each sequence? I have quite a number. Or is there a wildcard I could use.
Regards, Ade -----Original Message----- From: Greg Sabino Mullane <[email protected]> Date: Sun, 9 Nov 2014 10:47:12 To: Michelle Sullivan<[email protected]> Cc: <[email protected]>; [email protected]<[email protected]> Subject: Re: [Bucardo-general] PostgreSQL/Bucardo Sequences On Sun, Nov 09, 2014 at 04:40:28PM +0100, Michelle Sullivan wrote: > server1> ALTER SEQUENCE myseq INCREMENT BY 3 START WITH 1; > server2> ALTER SEQUENCE myseq INCREMENT BY 3 START WITH 2; > server3> ALTER SEQUENCE myseq INCREMENT BY 3 START WITH 3; In the case of already used tables, you will want to see where the sequences already are: SELECT last_value FROM myseq; (repeat for the others tables). Then choose a large, even number safely above all the existing values and do SQL similar to the above, but using RESTART. So if your current sequences are at 16341 and 16992 and 17012, you might do: server1> ALTER SEQUENCE myseq INCREMENT BY 3 RESTART WITH 18000; server2> ALTER SEQUENCE myseq INCREMENT BY 3 RESTART WITH 18001; server3> ALTER SEQUENCE myseq INCREMENT BY 3 RESTART WITH 18002; -- Greg Sabino Mullane [email protected] End Point Corporation PGP Key: 0x14964AC8 _______________________________________________ Bucardo-general mailing list [email protected] https://mail.endcrypt.com/mailman/listinfo/bucardo-general
