mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +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);
|
||||
strcat(connection_string, " fallback_application_name='repmgr'");
|
||||
|
||||
log_debug(_("Connecting to: '%s'"), connection_string);
|
||||
|
||||
conn = PQconnectdb(connection_string);
|
||||
|
||||
/* 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 */
|
||||
*master_id = atoi(PQgetvalue(res1, i, 0));
|
||||
strncpy(master_conninfo, PQgetvalue(res1, i, 1), MAXCONNINFO);
|
||||
log_info(_("checking role of cluster node '%s'\n"),
|
||||
master_conninfo);
|
||||
log_info(_("checking role of cluster node '%i'\n"),
|
||||
*master_id);
|
||||
master_conn = establish_db_connection(master_conninfo, false);
|
||||
|
||||
if (PQstatus(master_conn) != CONNECTION_OK)
|
||||
|
||||
@@ -619,7 +619,10 @@ standby_monitor(void)
|
||||
}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user