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

@@ -2204,7 +2204,7 @@ do_primary_failover(void)
static void
update_monitoring_history(void)
{
ReplInfo replication_info = T_REPLINFO_INTIALIZER;
ReplInfo replication_info;
XLogRecPtr primary_last_wal_location = InvalidXLogRecPtr;
long long unsigned int apply_lag_bytes = 0;
@@ -2223,6 +2223,8 @@ update_monitoring_history(void)
return;
}
init_replication_info(&replication_info);
if (get_replication_info(local_conn, &replication_info) == false)
{
log_warning(_("unable to retrieve replication status information, unable to update monitoring history"));