Refactor ReplInfo struct handling

Eventually we'll want to have this contain the optional replication
info contained in the t_node_info struct, which should then contain a
pointer to a ReplInfo struct.
This commit is contained in:
Ian Barwick
2019-02-02 18:36:59 +09:00
parent 59ed86c01a
commit f9a1861ded
5 changed files with 23 additions and 14 deletions

View File

@@ -75,7 +75,7 @@ do_node_status(void)
ItemList warnings = {NULL, NULL};
RecoveryType recovery_type = RECTYPE_UNKNOWN;
ReplInfo replication_info = T_REPLINFO_INTIALIZER;
ReplInfo replication_info;
t_recovery_conf recovery_conf = T_RECOVERY_CONF_INITIALIZER;
char data_dir[MAXPGPATH] = "";
@@ -90,6 +90,9 @@ do_node_status(void)
return _do_node_status_is_shutdown_cleanly();
}
init_replication_info(&replication_info);
/* config file required, so we should have "conninfo" and "data_directory" */
conn = establish_db_connection(config_file_options.conninfo, true);
strncpy(data_dir, config_file_options.data_directory, MAXPGPATH);