[Bucardo-general] Patch: fix quoted table/index names

Greg Sabino Mullane greg at endpoint.com
Fri Nov 11 04:15:52 UTC 2011


On Thu, Nov 10, 2011 at 11:53:38PM +0100, Sean M. Pappalardo wrote:
> I'm a new Bucardo user and my databases have table names with
> capital letters, accents, dashes and spaces (because they're used in
> the UI.)
> The attached patch was necessary to allow Bucardo 4.4.7 to handle
> these names when I added a sync.

>          if ($safeindex1 =~ s/"/""/g or $safeindex1 =~ / /) {
> -            $safeindex1 = qq{"$safeindex1"};
> +            $safeindex1 = qq{$safeindex1};
>          }

I'm not sure how I see this fixes the problem you described. The 
code was wrapping the index in double quotes if it contained 
any quote or space characters. No doubt the accents and spaces 
you are using are breaking things, but I don't think this is 
quite the right solution. We should probably add some tables 
with spaces etc. into the tests to help flush this out.

> I've also had many problems with the bucardo_ctl script's install
> process (it's got the wrong version number, it never asks for a
> password for the new role, and it doesn't handle auth type md5 very
> well) so had to run the script a few times. It still said
> INSTALLATION FAILED () but with nothing in the parentheses, I
> figured it was a bogus error since I was able to continue.

Sorry about the installation issues. We can at least fix the 
version number easy enough.

> I also couldn't get the .pgpass to work so was forced to use pass=
> in the add db command.

That's unfortunate: could you get the .pgpass to work from psql?

> Right now the main problem is that I ran a pushdelta sync and
> nothing changed on the target! Is there a log somewhere I can look
> to see what (didn't) happen?

Yes: there should be a log.bucardo file created from wherever you 
started Bucardo from. That should have some very copious 
logging to wade through.

You might also try out Bucardo 5 and see how many of this issues 
have been addressed there.

-- 
Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20111110/92da94dc/attachment.bin 


More information about the Bucardo-general mailing list