Store upstream node ID if set

Required to manage cascaded standbys
This commit is contained in:
Ian Barwick
2015-01-16 00:29:43 +09:00
parent a20afe28ec
commit 3dfa33d01d
4 changed files with 29 additions and 7 deletions

View File

@@ -23,10 +23,13 @@
#include "repmgr.h"
#include "strutil.h"
typedef struct
{
char cluster_name[MAXLEN];
int node;
int upstream_node;
char conninfo[MAXLEN];
int failover;
int priority;
@@ -47,7 +50,8 @@ typedef struct
int retry_promote_interval_secs;
} t_configuration_options;
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", 0, 0 }
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, NO_UPSTREAM_NODE, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", 0, 0 }
void parse_config(const char *config_file, t_configuration_options * options);
void parse_line(char *buff, char *name, char *value);