mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: improve monitoring statistics logging
Add more granular logging to help diagnose issues, and also keep track of when the last monitoring statistics update was set and emit that as DETAIL every time we emit a log status update.
This commit is contained in:
@@ -4146,13 +4146,12 @@ add_monitoring_record(PGconn *primary_conn,
|
||||
}
|
||||
else
|
||||
{
|
||||
PGresult *res = NULL;
|
||||
|
||||
res = PQexec(local_conn, "SELECT repmgr.standby_set_last_updated()");
|
||||
PGresult *res = PQexec(local_conn, "SELECT repmgr.standby_set_last_updated()");
|
||||
|
||||
/* not critical if the above query fails */
|
||||
if (PQresultStatus(res) != PGRES_TUPLES_OK)
|
||||
log_warning(_("unable to set last_updated:\n %s"), PQerrorMessage(local_conn));
|
||||
log_warning(_("add_monitoring_record(): unable to set last_updated:\n %s"),
|
||||
PQerrorMessage(local_conn));
|
||||
|
||||
PQclear(res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user