[Bucardo-general] Column order and foreign key
Laurent GARCES
laurent.garces at l-rd.fr
Thu Mar 23 09:45:40 UTC 2017
Hi,
We have a 4 master replication setup that have been created with:
bucardo add db shared_db_on_host1 dbname=shared_db host=host1 user=user
password=password
bucardo add db shared_db_on_host2 dbname=shared_db host=host2 user=user
password=password
bucardo add db shared_db_on_host3 dbname=shared_db host=host3 user=user
password=password
bucardo add sync shared
dbs=shared_db_on_host1:source,shared_db_on_host2:source,shared_db_on_host3:source
tables=all
(Later)
bucardo add db shared_db_on_host4 dbname=shared_db host=host4 user=user
password=password
bucardo update dbgroup shared shared_db_on_host1:source
shared_db_on_host2:source shared_db_on_host3:source
shared_db_on_host4:source
bucardo validate sync shared
The database schema is the same on all host. But the fields order on
host4 is different in some tables.
So when we insert data on host4, the data are also inserted on host 1 to
3 but they are not in the right column.
host 4:
SELECT * FROM table;
*ID Value *
id1 value1
/id2 value2 <- inserted on host4/
host 1-3:
SELECT * FROM table;
*ID Value *
id1 value1
/value2 id2 <- inserted on host4/
Moreover ID has a foreign key constraint that is not respected as the
fields are inverted.
So my questions:
- Is this a "normal behaviour" of Bucardo?
- If yes, is there a way to force Bucardo to use column name instead
of just using column order?
- How can Bucardo can bypass the foreign key constraint?
--
Laurent GARCES
LRD www.l-rd.fr
+33 (0)4 67 92 52 56
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20170323/2a2a2e4d/attachment.html>
More information about the Bucardo-general
mailing list