mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 00:46:29 +00:00
Handle empty result set
Should never happen, but just in case.`
This commit is contained in:
@@ -448,6 +448,13 @@ get_upstream_connection(PGconn *standby_conn, char *cluster, int node_id,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!PQntuples(res))
|
||||||
|
{
|
||||||
|
log_notice(_("No upstream server record found"));
|
||||||
|
PQclear(res);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
strncpy(upstream_conninfo, PQgetvalue(res, 0, 0), MAXCONNINFO);
|
strncpy(upstream_conninfo, PQgetvalue(res, 0, 0), MAXCONNINFO);
|
||||||
|
|
||||||
if(upstream_node_id_ptr != NULL)
|
if(upstream_node_id_ptr != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user