[Bucardo-general] Conflict Handling: Newest Data Always Wins

Ben Allen bsa at lanl.gov
Wed Oct 10 17:22:55 UTC 2007


It appears after some quick testing, that this standard_conflict is  
working well and doing what I wanted.

Thanks,

Ben Allen


On Oct 9, 2007, at 7:07 PM, Greg Sabino Mullane wrote:

> On Tue, 2007-10-09 at 18:10 -0600, Spencer Christensen wrote:
>
>> my ($arg) = @_;
>> my $source_time = $arg->{sourcerow}->{BUCARDO_TXNTIME};
>> my $target_time = $arg->{targetrow}->{BUCARDO_TXNTIME};
>
> Sorry, Spencer, but that column is no longer there. The good news is
> that there is already a fairly recent (but hidden) standard_conflict
> method called 'latest' that does something similar. I'll commit an
> update to make it  visible in the docs and legal in the schema. The
> relevant code is at line 4135 of Bucardo.pm and it basically grabs the
> times like this:
>
> SELECT extract(epoch FROM max(txntime))
> FROM bucardo.bucardo_delta
> WHERE tablename=?
> AND rowid=?
>
> -- 
> Greg Sabino Mullane greg at endpoint.com
> End Point Corporation 610-983-9073
>
> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20071010/892c73be/attachment.html 


More information about the Bucardo-general mailing list