[Bucardo-general] bucardo fails to replicate when the column name contains german umlauts

Christian Ritter lnxlists at lownoize.org
Tue Sep 3 07:00:57 UTC 2013


On 2013-09-03 06:15, Greg Sabino Mullane wrote:
> On Mon, Sep 02, 2013 at 03:06:35PM +0200, Christian Ritter wrote:
>>  BUCARDO_ID | id |   host_ip   | prüfsumme
>> ------------+----+-------------+-----------
>>  1          |  1 | 192.168.1.1 | foobar
>> (1 row)
>
> (Good debugging so far everyone!)
>
> I would guess that the list of columns as returned from
> fetchall_hashref does not match the list stored in $g->{cols}.
> Certainly that would explain the behavior. I have not been able
> to duplicate the problem on 4.5.0. Could you try adding these
> lines to your Bucardo.pm and see what they spit out when you
> add a new row to one side?:
>
> diff --git a/Bucardo.pm b/Bucardo.pm
> index b303fcd..7c72f61 100644
> --- a/Bucardo.pm
> +++ b/Bucardo.pm
> @@ -5741,6 +5741,9 @@ sub start_kid {
>                      my (@srcrow, at tgtrow);
>                      if ($action & 1 or $action & 4) { ## source to
> target / source to source
>                          @srcrow = 
> @{$info1->{$pkval}}{@{$g->{cols}}};
> +                       warn Dumper $info1;
> +                       warn Dumper $g->{cols};
> +                       warn Dumper \@srcrow;
>                      }
>                      if ($action & 2 or $action & 8) { ## target to
> source / target to target
>                          @tgtrow = 
> @{$info2->{$pkval}}{@{$g->{cols}}};

Hi Greg,

i patched Bucardo.pm and here is the output:

$BUCARDO1 = {
   '1' => {
     'BUCARDO_ACTION' => 1,
     'BUCARDO_ID' => '1',
     "pr\x{fc}fsumme" => 'foobar',
     'id' => 1,
     'host_ip' => '192.168.1.1'
   },
   '2' => {
     'BUCARDO_ACTION' => 1,
     'BUCARDO_ID' => '2',
     "pr\x{fc}fsumme" => 'foobar',
     'id' => 2,
     'host_ip' => '192.168.1.2'
   }
};
$BUCARDO1 = [
   'host_ip',
   'prüfsumme'
];
$BUCARDO1 = [
   '192.168.1.1',
   undef
];
[Tue Sep  3 08:10:22 2013]  KID [1/2] public.testtable INSERT source to 
target pk 1
[Tue Sep  3 08:10:22 2013]  KID Warning! Aborting due to exception for 
public.testtable.id: 1 Error was DBD::Pg::st execute failed: ERROR:  
null value in column "prüfsumme" violates not-null constraint at 
/root/perl5/lib/perl5/Bucardo.pm line 5772.


The Full Log is attached to this mail.


Cheers

Christian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bucardo.txt
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130903/71a13d6a/attachment-0001.txt>


More information about the Bucardo-general mailing list