Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql Bucardo显示错误的postgres版本_Postgresql_Opensuse_Bucardo - Fatal编程技术网

Postgresql Bucardo显示错误的postgres版本

Postgresql Bucardo显示错误的postgres版本,postgresql,opensuse,bucardo,Postgresql,Opensuse,Bucardo,我正在安装Bucardo以在openSUSE Leap 42.3上复制我的Postgres服务器(10.1),并且我已经成功地编译了Bucardo的可执行文件。当我尝试bucardo install并将参数修改为: host:<none> port:5432 user:aSuperUser database:bucardo piddir:/tmp/bucardo (already created) 主机: 港口:5432 用户:Asupurer 数据库:bucardo piddir

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

host:<none>
port:5432
user:aSuperUser
database:bucardo
piddir:/tmp/bucardo (already created)
主机:
港口:5432
用户:Asupurer
数据库:bucardo
piddir:/tmp/bucardo(已创建)

Bucardo说:
Postgres版本是4.8。Bucardo要求8.1或更高版本。
怎么会出现这种情况?我安装了Postgres10,而不是4.8。我还通过
select version()验证了版本并且,我的机器上只有一个postgres安装。

它似乎在master中已修复。有一个邮件列表,您可以自己在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
中,没有写入权限,因此您必须对其进行更改。

可能您的bucardo版本没有为Postgres 10引入的新编号方案做好准备。@a_horse__没有名字我可以自己解决这个问题吗?我下载了Bucardo的最新版本。另外,我不想降级到Postgres9,PGV9.6
抱歉,Bucardo需要Postgres 8.1或更高版本。这仅为0.42