我正在安装Bucardo以在openSUSE Leap 42.3上复制Postgres服务器(10.1),我已经成功地编译了Bucardo的可执行文件。当我尝试bucardo install并将参数修改为:

host:<none>
port:5432
user:aSuperUser
database:bucardo
piddir:/tmp/bucardo (already created)

布卡多说:Postgres version is 4.8. Bucardo requires 8.1 or higher.这怎么可能发生?我安装了Postgres10,而不是4.8。我还通过select version();验证了版本,而且我的机器上只有一个postgres安装。

最佳答案

好像是在师父那里修好的。有一个thread in the bucardo-general邮件列表,您可以自己对bucardo脚本进行一些更改或应用diff:

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中,没有写入权限,因此必须对其进行更改。

关于postgresql - Bucardo显示错误的postgres版本,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/48124124/

10-12 14:08