Add "cluster matrix" mode and "ssh_hostname" parameter

- The "cluster matrix" command supports CSV mode via the --csv
  switch.
- Add the optional ssh_hostname configuration parameter, which is
  required by "cluster matrix".
- A corresponding ssh_hostname column has been added to the repl_nodes
  table and to the repl_show_nodes view.
This commit is contained in:
Gianni Ciolli
2016-05-24 00:07:03 +02:00
committed by Ian Barwick
parent 77de5dbeeb
commit 9b5b9acb82
8 changed files with 295 additions and 23 deletions

View File

@@ -45,6 +45,7 @@ typedef struct s_node_info
t_server_type type;
char name[MAXLEN];
char conninfo_str[MAXLEN];
char ssh_hostname_str[MAXLEN];
char slot_name[MAXLEN];
int priority;
bool active;
@@ -61,6 +62,7 @@ typedef struct s_node_info
"", \
"", \
"", \
"", \
DEFAULT_PRIORITY, \
true, \
false, \
@@ -126,7 +128,7 @@ bool start_backup(PGconn *conn, char *first_wal_segment, bool fast_checkpoint);
bool stop_backup(PGconn *conn, char *last_wal_segment);
bool set_config_bool(PGconn *conn, const char *config_param, bool state);
bool witness_copy_node_records(PGconn *masterconn, PGconn *witnessconn, char *cluster_name);
bool create_node_record(PGconn *conn, char *action, int node, char *type, int upstream_node, char *cluster_name, char *node_name, char *conninfo, int priority, char *slot_name, bool active);
bool create_node_record(PGconn *conn, char *action, int node, char *type, int upstream_node, char *cluster_name, char *node_name, char *conninfo, char *ssh_hostname, int priority, char *slot_name, bool active);
bool delete_node_record(PGconn *conn, int node, char *action);
int get_node_record(PGconn *conn, char *cluster, int node_id, t_node_info *node_info);
int get_node_record_by_name(PGconn *conn, char *cluster, const char *node_name, t_node_info *node_info);