From 94ba63581121bed689980c6aa1d3f9abd5b5247e Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 13 Aug 2019 16:45:29 +0900 Subject: [PATCH] Define our own PG_AUTOCONF_FILENAME --- configfile.h | 6 ++++++ repmgr-client.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configfile.h b/configfile.h index f446b8db..33f1382a 100644 --- a/configfile.h +++ b/configfile.h @@ -28,6 +28,12 @@ /* magic number for use in t_recovery_conf */ #define TARGET_TIMELINE_LATEST 0 +/* + * This is defined src/include/utils.h, however it's not practical + * to include that from a frontend application. + */ +#define PG_AUTOCONF_FILENAME "postgresql.auto.conf" + extern bool config_file_found; extern char config_file_path[MAXPGPATH]; diff --git a/repmgr-client.c b/repmgr-client.c index 71ee495b..02348eb0 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -3066,8 +3066,8 @@ copy_remote_files(char *host, char *remote_user, char *remote_path, * Ideally we'd use PG_AUTOCONF_FILENAME from utils/guc.h, but * that has too many dependencies for a mere client program. */ - appendPQExpBufferStr(&rsync_flags, - " --exclude=postgresql.auto.conf.tmp"); + appendPQExpBuffer(&rsync_flags, " --exclude=%s.tmp", + PG_AUTOCONF_FILENAME); } /* Temporary files which we don't want, if they exist */