[Bucardo-general] Double insertion with compound primary key tables and MongoDB

Ali Asad Lotia ali at anobii.com
Mon Apr 30 17:35:40 UTC 2012


Greetings All
I'm using Bucardo 5/4.99 beta from the Git repo. The current  and I have a
sync set up with PostgreSQL 9.1 machine as a source and MongoDB 2.0.4 as a
target. When working with a table that has a single column primary key, all
is well and things appear to work nicely when syncing with MongoDB. On
insert a new document is created in the equivalently named MongoDB
collection and when updated, the document that has the same . However, when
working with a table that has a multi-column primary key, it appears that
the delete isn't working well and it appears to insert the same record
twice. The table in question has a three column primary key composed of the
following types int4, int4, int2 and to test, I update a single row in the
table by setting the values in the columns to the original values.

The associated bucardo.delta table for the source table contains the
primary key columns for the updated record, but when the sync is kicked, I
see an error in the log.bucardo file that has the following entries:
Use of uninitialized value in pattern match (m//) at Bucardo.pm line 8155.
Use of uninitialized value in string eq at Bucardo.pm line 8158.
Use of uninitialized value in pattern match (m//) at Bucardo.pm line 8161.

which appears to be an issue with multi-column primary keys since I don't
see the same problem when doing a sync from PostgreSQL to MongoDB with a
single column primary key. I'm going to work on figuring this issue out,
but my Perl is more than a bit rusty. Any input on this matter would be
much appreciated.

Thanks,
Ali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20120430/c30c0db8/attachment.html>


More information about the Bucardo-general mailing list