[Bucardo-general] bucardo serial field replication.
Rodrigo Gonzalez
rjgonzale at gmail.com
Thu Jan 29 16:00:40 UTC 2009
Start both sequences with different start and same increment. Increment
must be > 1
As an example
sequence in db 1
start = 1
increment = 2
sequence in db 2
start = 2
increment = 2
So, first db will use 1, 3, 5, .... and second one 2,4,6.....
Check ALTER SEQUENCE to see how to do that
Itamar Reis Peixoto wrote:
> I have a master-master replication (SWAP)
>
> db1 - machine1
> customers (id serial, name(varchar(50))
>
> db1 - machine2
> customers (id serial, name(varchar(50))
>
> insert into db1.customers (name) values ("Itamar")
>
> insert into db2.customers (name) values ("Greg")
>
> after inserting "Greg" in db2 it's get the id=1 and overwrite the name
> "Itamar" because sequence is not replicated
>
>
> any suggestion about how to deal with this ?
>
>
> ------------
>
> Itamar Reis Peixoto
>
> e-mail/msn: itamar at ispbrasil.com.br
> sip: itamar at ispbrasil.com.br
> skype: itamarjp
> icq: 81053601
> +55 11 4063 5033
> +55 34 3221 8599
> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general
>
More information about the Bucardo-general
mailing list