1

I'm installing Bucardo to replicate my Postgres server (10.1) on openSUSE Leap 42.3, and I have successfully complied the executable of Bucardo. When I tried bucardo install and modified the parameter as:

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

Bucardo says: Postgres version is 4.8. Bucardo requires 8.1 or higher. How could this happen? I installed postgres 10, not 4.8. I also verified the version by select version(); and, there is only one postgres installation on my machine.

Ryan
  • 1,040
  • 3
  • 16
  • 25
  • Maybe your Bucardo version isn't prepared for the new numbering scheme introduced with Postgres 10. –  Jan 06 '18 at 10:37
  • @a_horse_with_no_name Can I fix this myself? I downloaded the latest version of Bucardo. Also, I don't want to downgrade to Postgres 9. – Ryan Jan 07 '18 at 07:27
  • This is happening also to me with pg v9.6 `Sorry, Bucardo requires Postgres version 8.1 or higher. This is only 0.42` – Francisco Puga Mar 04 '18 at 11:42

1 Answers1

1

It seems to be fixed in master. There is a thread in the bucardo-general mailing list, that explains that you can make by yourself a couple of changes in the bucardo script or apply the 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";

The bucardo script is in /usr/local/bin/bucardo and does not have write permissions so you must change it.

Francisco Puga
  • 23,869
  • 5
  • 48
  • 64