mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
rempgr: don't link to backend functions
The intent was to avoid maintaining duplicate code, but this approach makes it difficult to build Debian packages (see GitHub #261). As the functions in question are quite compact and unlikely to change, we'll just use the adapted versions provided for 9.5 and earlier.
This commit is contained in:
16
compat.c
16
compat.c
@@ -1,8 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* compat.c
|
* compat.c
|
||||||
* Provide backports of various functions not publicly
|
* Provides a couple of useful string utility functions adapted
|
||||||
* exposed before PostgreSQL 9.6
|
* from the backend code, which are not publicly exposed. They're
|
||||||
|
* unlikely to change but it would be worth keeping an eye on them
|
||||||
|
* for any fixes/improvements
|
||||||
*
|
*
|
||||||
* Copyright (C) 2ndQuadrant, 2010-2016
|
* Copyright (C) 2ndQuadrant, 2010-2016
|
||||||
*
|
*
|
||||||
@@ -24,8 +26,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (PG_VERSION_NUM < 90600)
|
|
||||||
|
|
||||||
#include "repmgr.h"
|
#include "repmgr.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
* the string as a value, in a keyword/pair value in a libpq connection
|
* the string as a value, in a keyword/pair value in a libpq connection
|
||||||
* string
|
* string
|
||||||
*
|
*
|
||||||
* This function is copied from src/bin/pg_dump/dumputils.c
|
* This function is adapted from src/fe_utils/string_utils.c (before 9.6
|
||||||
* as it is only publicly exposed from 9.6
|
* located in: src/bin/pg_dump/dumputils.c)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
appendConnStrVal(PQExpBuffer buf, const char *str)
|
appendConnStrVal(PQExpBuffer buf, const char *str)
|
||||||
@@ -79,8 +79,6 @@ appendConnStrVal(PQExpBuffer buf, const char *str)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Adapted from: src/fe_utils/string_utils.c
|
* Adapted from: src/fe_utils/string_utils.c
|
||||||
*
|
|
||||||
* Function not publicly available before PostgreSQL 9.6.
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
appendShellString(PQExpBuffer buf, const char *str)
|
appendShellString(PQExpBuffer buf, const char *str)
|
||||||
@@ -107,5 +105,3 @@ appendShellString(PQExpBuffer buf, const char *str)
|
|||||||
appendPQExpBufferChar(buf, '\'');
|
appendPQExpBufferChar(buf, '\'');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
6
repmgr.c
6
repmgr.c
@@ -62,13 +62,7 @@
|
|||||||
#include "check_dir.h"
|
#include "check_dir.h"
|
||||||
#include "strutil.h"
|
#include "strutil.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#if (PG_VERSION_NUM < 90600)
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#else
|
|
||||||
#include "fe_utils/string_utils.h"
|
|
||||||
#include "postgres_fe.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef RECOVERY_COMMAND_FILE
|
#ifndef RECOVERY_COMMAND_FILE
|
||||||
#define RECOVERY_COMMAND_FILE "recovery.conf"
|
#define RECOVERY_COMMAND_FILE "recovery.conf"
|
||||||
|
|||||||
Reference in New Issue
Block a user