Hi,
our source database is in the same cluster as the bucardo database.
Hence, I received an error when issuing
bucardo_ctl add table <blah> db=<yadda>
because the validate_goat function executes as whoever's running the
database, thus potentially conflicting with the user as specified in the
connection string as returned by bucardo.db_getconn.
What do you think of the following patch?
--- bucardo.schema.org 2012-06-11 16:35:23.000000000 -0500
+++ bucardo.schema 2012-06-13 19:19:59.000000000 -0500
@@ -850,6 +850,8 @@
$row = $rv->{rows}[0]{apple};
($db{dsn},$db{user},$db{pass},$db{ssp}) = split /\n/ => $row;
+$db{user} = '' unless $db{dsn} =~ /host=/;
+
elog(DEBUG, "Connecting in validate_goat as $db{dsn} user=$db{user} pid=$$
for table $schema.$table");
$dbh = DBI->connect($db{dsn}, $db{user}, $db{pass},
It essentially removes the username in those cases is which the host name
is missing in the connection string which in turn implies utilization of
UNIX sockets. Thoughts?
Cheers,
-ar
_______________________________________________
Bucardo-general mailing list
[email protected]
https://mail.endcrypt.com/mailman/listinfo/bucardo-general