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

@@ -3024,7 +3024,7 @@ do_standby_switchover(void)
bool switchover_success = true;
XLogRecPtr remote_last_checkpoint_lsn = InvalidXLogRecPtr;
ReplInfo replication_info = T_REPLINFO_INTIALIZER;
ReplInfo replication_info;
/* store list of configuration files on the demotion candidate */
KeyValueList remote_config_files = {NULL, NULL};
@@ -4190,6 +4190,7 @@ do_standby_switchover(void)
log_verbose(LOG_INFO, _("successfully reconnected to local node"));
}
init_replication_info(&replication_info);
/*
* Compare standby's last WAL receive location with the primary's last
* checkpoint LSN. We'll loop for a while as it's possible the standby's