【问题标题】:Bucardo shows wrong postgres versionBucardo 显示错误的 postgres 版本
【发布时间】:2018-01-06 04:01:26
【问题描述】:

我正在安装 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 安装。

【问题讨论】:

  • 也许您的 Bucardo 版本没有为 Postgres 10 引入的新编号方案做好准备。
  • @a_horse_with_no_name 我可以自己解决这个问题吗?我下载了最新版本的 Bucardo。另外,我不想降级到 Postgres 9。
  • 这也发生在我身上,pg v9.6 Sorry, Bucardo requires Postgres version 8.1 or higher. This is only 0.42

标签: postgresql opensuse bucardo


【解决方案1】:

似乎在master中修复了。有一个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 中,并且没有写入权限,因此您必须更改它。

【讨论】:

    猜你喜欢
    • 2020-07-31
    • 2019-11-20
    • 1970-01-01
    • 1970-01-01
    • 2016-08-07
    • 2021-09-11
    • 2012-12-27
    • 1970-01-01
    • 2022-01-21
    相关资源
    最近更新 更多