Store the replication user in repmgr.nodes

When creating recovery.conf outside of "repmgr standby clone",
there was no way of knowing if a replication user had been
explicitly provided with --replication-user, meaning the value
of "primary_conninfo" would be set to the "conninfo" field of the
node's upstream node record.

We'll add an extra column to store the replication user for each
node so it can be referenced at any time.
This commit is contained in:
Ian Barwick
2017-06-14 23:27:26 +09:00
parent aa5539ac5e
commit 36b3782009
8 changed files with 58 additions and 25 deletions

View File

@@ -48,8 +48,9 @@ typedef struct
/* node information */
int node_id;
int upstream_node_id;
char node_name[MAXLEN];
char node_name[MAXLEN];
char conninfo[MAXLEN];
char replication_user[MAXLEN];
char pg_bindir[MAXLEN];
int replication_type;
@@ -109,7 +110,7 @@ typedef struct
#define T_CONFIGURATION_OPTIONS_INITIALIZER { \
/* node information */ \
UNKNOWN_NODE_ID, NO_UPSTREAM_NODE, "", "", "", REPLICATION_TYPE_PHYSICAL, \
UNKNOWN_NODE_ID, NO_UPSTREAM_NODE, "", "", "", "", REPLICATION_TYPE_PHYSICAL, \
/* log settings */ \
"", "", "", \
/* standby clone settings */ \