Define our own PG_AUTOCONF_FILENAME

This commit is contained in:
Ian Barwick
2019-08-13 16:45:29 +09:00
parent c0f3990973
commit 94ba635811
2 changed files with 8 additions and 2 deletions

View File

@@ -28,6 +28,12 @@
/* magic number for use in t_recovery_conf */ /* magic number for use in t_recovery_conf */
#define TARGET_TIMELINE_LATEST 0 #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 bool config_file_found;
extern char config_file_path[MAXPGPATH]; extern char config_file_path[MAXPGPATH];

View File

@@ -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 * Ideally we'd use PG_AUTOCONF_FILENAME from utils/guc.h, but
* that has too many dependencies for a mere client program. * that has too many dependencies for a mere client program.
*/ */
appendPQExpBufferStr(&rsync_flags, appendPQExpBuffer(&rsync_flags, " --exclude=%s.tmp",
" --exclude=postgresql.auto.conf.tmp"); PG_AUTOCONF_FILENAME);
} }
/* Temporary files which we don't want, if they exist */ /* Temporary files which we don't want, if they exist */