mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Only log some debug items if verbose flag is set.
This commit is contained in:
15
repmgrd.c
15
repmgrd.c
@@ -457,7 +457,10 @@ main(int argc, char **argv)
|
||||
|
||||
do
|
||||
{
|
||||
log_debug("standby check loop...\n");
|
||||
if (verbose)
|
||||
{
|
||||
log_debug("standby check loop...\n");
|
||||
}
|
||||
|
||||
if (node_info.type == WITNESS)
|
||||
{
|
||||
@@ -1013,7 +1016,11 @@ standby_monitor(void)
|
||||
* Execute the query asynchronously, but don't check for a result. We will
|
||||
* check the result next time we pause for a monitor step.
|
||||
*/
|
||||
log_debug("standby_monitor: %s\n", sqlquery);
|
||||
if (verbose)
|
||||
{
|
||||
log_debug("standby_monitor:() %s\n", sqlquery);
|
||||
}
|
||||
|
||||
if (PQsendQuery(master_conn, sqlquery) == 0)
|
||||
log_warning(_("query could not be sent to master. %s\n"),
|
||||
PQerrorMessage(master_conn));
|
||||
@@ -1193,6 +1200,7 @@ do_master_failover(void)
|
||||
{
|
||||
log_info(_("unable to retrieve node's last standby location: %s\n"),
|
||||
PQerrorMessage(node_conn));
|
||||
|
||||
log_debug(_("connection details: %s\n"), nodes[i].conninfo_str);
|
||||
PQclear(res);
|
||||
PQfinish(node_conn);
|
||||
@@ -1336,6 +1344,9 @@ do_master_failover(void)
|
||||
PQclear(res);
|
||||
|
||||
/* If position is 0/0, keep checking */
|
||||
/* XXX we should add a timeout here to prevent infinite looping
|
||||
* if the other node's repmgrd is not up
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user