mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
repmgrd: prevent standby connection handle from going stale
If monitoring history not in use, there's no activity on the standby's connection handle, so if e.g. the standby is restarted, PQstatus() never returns CONNECTION_BAD and repmgrd never notices the connection is stale. Therefore execute a throw-away statement at "monitor_interval_secs".
This commit is contained in:
@@ -1070,7 +1070,13 @@ loop:
|
||||
|
||||
|
||||
if (PQstatus(primary_conn) == CONNECTION_OK && config_file_options.monitoring_history == true)
|
||||
{
|
||||
update_monitoring_history();
|
||||
}
|
||||
else
|
||||
{
|
||||
connection_ping(local_conn);
|
||||
}
|
||||
|
||||
if (got_SIGHUP)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user