mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Check minimum server version for pg_rewind
This commit is contained in:
11
dbutils.c
11
dbutils.c
@@ -1316,6 +1316,17 @@ can_use_pg_rewind(PGconn *conn, const char *data_directory, PQExpBufferData *rea
|
|||||||
{
|
{
|
||||||
bool can_use = true;
|
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 (guc_set(conn, "full_page_writes", "=", "off"))
|
||||||
{
|
{
|
||||||
if (can_use == false)
|
if (can_use == false)
|
||||||
|
|||||||
4
repmgr.h
4
repmgr.h
@@ -26,8 +26,8 @@
|
|||||||
#include "dbutils.h"
|
#include "dbutils.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
#define MIN_SUPPORTED_VERSION "9.5"
|
#define MIN_SUPPORTED_VERSION "9.4"
|
||||||
#define MIN_SUPPORTED_VERSION_NUM 90500
|
#define MIN_SUPPORTED_VERSION_NUM 90400
|
||||||
|
|
||||||
#define REPLICATION_TYPE_PHYSICAL 1
|
#define REPLICATION_TYPE_PHYSICAL 1
|
||||||
#define REPLICATION_TYPE_BDR 2
|
#define REPLICATION_TYPE_BDR 2
|
||||||
|
|||||||
Reference in New Issue
Block a user