Store configuration file in repmgr.nodes table

When executing repmgr on remote nodes, we otherwise end up jumping
through hoops as we can't make assumptions about where the configuration
file is located, but really need to be able to provide it.

From a support point of view it will also make life easier as it will
be easy to specify exactly which file to provide.
This commit is contained in:
Ian Barwick
2017-08-10 08:03:24 +09:00
parent a57fb5b50c
commit 1d99a07b43
6 changed files with 17 additions and 10 deletions

View File

@@ -15,7 +15,7 @@
#include "strutil.h"
#include "voting.h"
#define REPMGR_NODES_COLUMNS "node_id, type, upstream_node_id, node_name, conninfo, repluser, slot_name, location, priority, active, '' AS upstream_node_name "
#define REPMGR_NODES_COLUMNS "node_id, type, upstream_node_id, node_name, conninfo, repluser, slot_name, location, priority, active, config_file, '' AS upstream_node_name "
typedef enum {
UNKNOWN = 0,
@@ -84,6 +84,7 @@ typedef struct s_node_info
int priority;
bool active;
char slot_name[MAXLEN];
char config_file[MAXPGPATH];
/* used during failover to track node status */
XLogRecPtr last_wal_receive_lsn;
NodeStatus node_status;
@@ -115,6 +116,7 @@ typedef struct s_node_info
DEFAULT_PRIORITY, \
true, \
"", \
"", \
/* used during failover to track node status */ \
InvalidXLogRecPtr, \
NODE_STATUS_UNKNOWN, \