> On Apr 6, 2018, at 3:10 AM, Raghu Udiyar <ra...@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.


David Christensen
End Point Corporation

Attachment: signature.asc
Description: Message signed with OpenPGP

Bucardo-general mailing list

Reply via email to