mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgrd: in BDR mode, have each repmgrd monitor each node
This will cover both the case when an entire node including repmgrd goes down, and when one PostgreSQL instance goes down but repmgrd is still up (in which case only one of the repmgrds will handle the failover).
This commit is contained in:
19
repmgrd.c
19
repmgrd.c
@@ -665,6 +665,23 @@ calculate_elapsed(instr_time start_time)
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
print_monitoring_state(MonitoringState monitoring_state)
|
||||
{
|
||||
switch(monitoring_state)
|
||||
{
|
||||
case MS_NORMAL:
|
||||
return "normal";
|
||||
|
||||
case MS_DEGRADED:
|
||||
return "degraded";
|
||||
}
|
||||
|
||||
/* should never reach here */
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
close_connections()
|
||||
{
|
||||
@@ -694,3 +711,5 @@ terminate(int retval)
|
||||
|
||||
exit(retval);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user