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

2018-04-08 Thread Raghu Udiyar
Ok - I will check the sync then. Thanks.

On Fri, Apr 6, 2018 at 7:44 PM David Christensen  wrote:

>
>
> On Apr 6, 2018, at 3:10 AM, Raghu Udiyar  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
> da...@endpoint.com
> 785-727-1171 <(785)%20727-1171>
>
>
>
> --
--
[image: photo] 
Raghu Udiyar
Manager - Production Engineering
[image: https://in.linkedin.com/in/parul-jain-7b489830]

___
Bucardo-general mailing list
Bucardo-general@bucardo.org
https://mail.endcrypt.com/mailman/listinfo/bucardo-general


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

2018-04-06 Thread David Christensen


> On Apr 6, 2018, at 3:10 AM, Raghu Udiyar  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
da...@endpoint.com
785-727-1171





signature.asc
Description: Message signed with OpenPGP
___
Bucardo-general mailing list
Bucardo-general@bucardo.org
https://mail.endcrypt.com/mailman/listinfo/bucardo-general