[Bucardo-general] How does Bucardo 5.x handles DELETES?

David Christensen david at endpoint.com
Fri Apr 6 14:14:17 UTC 2018



> On Apr 6, 2018, at 3:10 AM, Raghu Udiyar <raghu at helpshift.com> wrote:
> 
> Hi
> 
> We are seeing that row deletes are not being propagated to the target PG db. This is a PG one way sync using Bucardo 5.4.1 (using quick_delta_check=0).
> 
> In Bucardo logs we always see deletes=0, but deletes are happening on the table in question.
> 
> I was trying to figure out how deletes are handled in Bucardo. I can see the DELETE trigger adds the OLD values to the corresponding delta table, but the table does not have any field to indicate if this is a DELETE or not. The same is done for INSERT albeit using the NEW values. Only thing added is the txntime. Is this used to implicitly delete records as a side effect of an row insert/update ?
> 
> Thanks
> Raghu

Hi Raghu,

DELETEs are noted as a delta row with no corresponding row in the table; basically any row which is modified stores the PK and the transaction time.  INSERTs/UPDATEs are handled the same way; effectively Bucardo will delete any keys on the target with PKs in the delta tables, then copy any data from the original table with the same keys.  In the case of DELETEs, those will not exist, so the row is effectively deleted.

Have you verified that INSERTs and UPDATEs are working on the target?  I’m a little curious why it would just affect DELETEs and not the other types, so I’d first verify that the sync is working at all.

Best,

David
--
David Christensen
End Point Corporation
david at endpoint.com
785-727-1171



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20180406/7ad4604c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20180406/7ad4604c/attachment.sig>


More information about the Bucardo-general mailing list