repmgr: add option --upstream-conninfo

When executing `repmgr standby clone`, this enables the primary_conninfo
string set in recovery.conf to be explictly defined (rather than generated
from the upstream node's conninfo string and connection parameters).

This is primarily intended for those cases when an L2 cascaded standby
is being cloned from the cluster primary, and its intended upstream
might not yet be available.
This commit is contained in:
Ian Barwick
2016-12-03 15:28:42 +09:00
committed by Ian Barwick
parent eb2cdf8a98
commit be58af701b
2 changed files with 64 additions and 2 deletions

View File

@@ -63,6 +63,7 @@
#define OPT_REGISTER_WAIT 12
#define OPT_CLUSTER 13
#define OPT_LOG_TO_FILE 14
#define OPT_UPSTREAM_CONNINFO 15
/* deprecated command line options */
#define OPT_INITDB_NO_PWPROMPT 998
@@ -111,6 +112,7 @@ typedef struct
int copy_external_config_files_destination;
bool wait_register_sync;
int wait_register_sync_seconds;
char upstream_conninfo[MAXLEN];
char recovery_min_apply_delay[MAXLEN];
@@ -150,7 +152,7 @@ typedef struct
false, false, false, \
/* standby clone parameters */ \
false, DEFAULT_WAL_KEEP_SEGMENTS, false, false, false, false, false, false, \
CONFIG_FILE_SAMEPATH, false, 0, "", \
CONFIG_FILE_SAMEPATH, false, 0, "", "", \
/* witness create parameters */ \
false, \
/* standby follow parameters */ \