Bucardoans,

we had a situation in which our memory-constrained device would pick
bucardo_ctl or a postgres backend as a candidate to be killed when more
than 3,000 deltas would have to be copied to a slave in one transaction. I
attached a patch to correct the situation and was wondering whether it can
be considered to be applied upstream - at least for B4; it applies to the
PUSHDELTA section. In addition to the smaller chunk size (which admittedly
might not be ideal for larger systems), it contains the following changes:

1 - Allow tables to be replicated which contain unique keys where one or
more columns are NULL
2 - performance improvement by refactoring processing of the delta record
set

With regard to (1), we found out that Bucardo would not replicate unique
keys containing NULLs because the Postgres syntax does not produce output
for the following WHERE clause:

WHERE (col1,col2,col3,col4) IN (('A','B',NULL,'D'),('A',NULL,'C',NULL))

The algorithm would split those COPY operations into two separate queries
as such:

A) <blah> WHERE (col1,col2,col4) IN (('A','B','D')) AND col3 IS NULL
B) <blah> WHERE (col1,col3) IN (('A','C') AND col2 IS NULL AND col4 IS NULL

Best,
-ar

Attachment: Bucardo-4.4.8.pm.diff
Description: Binary data

_______________________________________________
Bucardo-general mailing list
[email protected]
https://mail.endcrypt.com/mailman/listinfo/bucardo-general

Reply via email to