mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
Add some debugging output
This commit is contained in:
@@ -37,6 +37,9 @@ establish_db_connection(const char *conninfo, const bool exit_on_error)
|
|||||||
|
|
||||||
strcpy(connection_string, conninfo);
|
strcpy(connection_string, conninfo);
|
||||||
strcat(connection_string, " fallback_application_name='repmgr'");
|
strcat(connection_string, " fallback_application_name='repmgr'");
|
||||||
|
|
||||||
|
log_debug(_("Connecting to: '%s'"), connection_string);
|
||||||
|
|
||||||
conn = PQconnectdb(connection_string);
|
conn = PQconnectdb(connection_string);
|
||||||
|
|
||||||
/* Check to see that the backend connection was successfully made */
|
/* Check to see that the backend connection was successfully made */
|
||||||
@@ -408,8 +411,8 @@ get_master_connection(PGconn *standby_conn, char *cluster,
|
|||||||
/* initialize with the values of the current node being processed */
|
/* initialize with the values of the current node being processed */
|
||||||
*master_id = atoi(PQgetvalue(res1, i, 0));
|
*master_id = atoi(PQgetvalue(res1, i, 0));
|
||||||
strncpy(master_conninfo, PQgetvalue(res1, i, 1), MAXCONNINFO);
|
strncpy(master_conninfo, PQgetvalue(res1, i, 1), MAXCONNINFO);
|
||||||
log_info(_("checking role of cluster node '%s'\n"),
|
log_info(_("checking role of cluster node '%i'\n"),
|
||||||
master_conninfo);
|
*master_id);
|
||||||
master_conn = establish_db_connection(master_conninfo, false);
|
master_conn = establish_db_connection(master_conninfo, false);
|
||||||
|
|
||||||
if (PQstatus(master_conn) != CONNECTION_OK)
|
if (PQstatus(master_conn) != CONNECTION_OK)
|
||||||
|
|||||||
@@ -619,7 +619,10 @@ standby_monitor(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_err(_("We haven't found a new master, waiting before retry...\n"));
|
log_err(
|
||||||
|
_("We haven't found a new master, waiting %s seconds before retry...\n"),
|
||||||
|
local_options.retry_promote_interval_secs
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wait local_options.retry_promote_interval_secs minutes
|
* wait local_options.retry_promote_interval_secs minutes
|
||||||
|
|||||||
Reference in New Issue
Block a user