我正在安装Bucardo以在openSUSE Leap 42.3上复制我的Postgres服务器(10.1),并且我已经成功地编写了Bucardo的可执行文件。当我尝试bucardo install
并将参数修改为:
host:<none>
port:5432
user:aSuperUser
database:bucardo
piddir:/tmp/bucardo (already created)
Bucardo说:Postgres version is 4.8. Bucardo requires 8.1 or higher.
这怎么可能发生?我安装了postgres 10,而不是4.8。我还通过select version();
验证了版本,并且我的机器上只安装了一个postgres。
答案 0 :(得分:1)
似乎是在主人身上修好了。有一个thread in the bucardo-general邮件列表,explains您可以自己制作bucardo脚本中的一些更改或应用差异:
diff --git a/bucardo b/bucardo index e1816f1..8e433ef 100755
--- a/bucardo
+++ b/bucardo @@ -8979,7 +8979,7 @@ sub install {
}
}
- if ($res !~ /(\d+)\.(\d+)(\S+)/) {
+ if ($res !~ /(\d+)\.(\d+)/) {
print "-->Sorry, unable to connect to the database\n\n";
warn $delayed_warning;
exit 1 if $bcargs->{batch}; @@ -8988,10 +8988,7 @@ sub install {
## At this point, we assume a good connection
## Assign the version variables
- my ($maj,$min,$rev) = ($1,$2,$3);
- ## We need to be able to handle things such as 9.2devel
- $rev =~ s/^\.//;
- $rev =~ s/(\d+)\.\d+/$1/;
+ my ($maj,$min) = ($1,$2);
$QUIET or print "Postgres version is: $maj.$min\n";
bucardo脚本位于/usr/local/bin/bucardo
,没有写入权限,因此您必须更改它。