diff --git a/dbutils.c b/dbutils.c index ec3d01b4..e680a54a 100644 --- a/dbutils.c +++ b/dbutils.c @@ -1316,6 +1316,17 @@ can_use_pg_rewind(PGconn *conn, const char *data_directory, PQExpBufferData *rea { bool can_use = true; + if (server_version_num == UNKNOWN_SERVER_VERSION_NUM) + server_version_num = get_server_version(conn, NULL); + + if (server_version_num < 90500) + { + appendPQExpBuffer( + reason, + _("pg_rewind available from PostgreSQL 9.5")); + return false; + } + if (guc_set(conn, "full_page_writes", "=", "off")) { if (can_use == false) diff --git a/repmgr.h b/repmgr.h index 3b41e39d..27e071fd 100644 --- a/repmgr.h +++ b/repmgr.h @@ -26,8 +26,8 @@ #include "dbutils.h" #include "log.h" -#define MIN_SUPPORTED_VERSION "9.5" -#define MIN_SUPPORTED_VERSION_NUM 90500 +#define MIN_SUPPORTED_VERSION "9.4" +#define MIN_SUPPORTED_VERSION_NUM 90400 #define REPLICATION_TYPE_PHYSICAL 1 #define REPLICATION_TYPE_BDR 2