mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
getMasterConnection() cannot avoid checking the same node that asks
to find the master. This was a micro optimization based on the fact that all commands that needed to detect the master were executed from the standby but now that we have CLUSTER level commands that is not true anymore
This commit is contained in:
@@ -185,7 +185,7 @@ main(int argc, char **argv)
|
||||
/* I need the id of the primary as well as a connection to it */
|
||||
log_info(_("%s Connecting to primary for cluster '%s'\n"),
|
||||
progname, local_options.cluster_name);
|
||||
primaryConn = getMasterConnection(myLocalConn, local_options.node,
|
||||
primaryConn = getMasterConnection(myLocalConn,
|
||||
local_options.cluster_name,
|
||||
&primary_options.node,NULL);
|
||||
if (primaryConn == NULL)
|
||||
@@ -269,7 +269,7 @@ MonitorExecute(void)
|
||||
log_err(_("We couldn't reconnect to master. Now checking if another node has been promoted.\n"));
|
||||
for (connection_retries = 0; connection_retries < 6; connection_retries++)
|
||||
{
|
||||
primaryConn = getMasterConnection(myLocalConn, local_options.node,
|
||||
primaryConn = getMasterConnection(myLocalConn,
|
||||
local_options.cluster_name, &primary_options.node,NULL);
|
||||
if (PQstatus(primaryConn) == CONNECTION_OK)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user