Check replication lag before attempting switchover

This commit is contained in:
Ian Barwick
2017-08-08 10:16:47 +09:00
parent fd5dfa2ebc
commit f2cf46bba3
12 changed files with 605 additions and 48 deletions

View File

@@ -75,6 +75,8 @@ typedef struct
/* node check settings */
int archiver_lag_warning;
int archiver_lag_critical;
int replication_lag_warning;
int replication_lag_critical;
/* repmgrd settings */
failover_mode_opt failover_mode;
@@ -130,6 +132,7 @@ typedef struct
false, "", "", "", "", { NULL, NULL }, \
/* node check settings */ \
DEFAULT_ARCHIVER_LAG_WARNING, DEFAULT_ARCHIVER_LAG_CRITICAL, \
DEFAULT_REPLICATION_LAG_WARNING, DEFAULT_REPLICATION_LAG_CRITICAL, \
/* repmgrd settings */ \
FAILOVER_MANUAL, DEFAULT_LOCATION, DEFAULT_PRIORITY, "", "", \
DEFAULT_MONITORING_INTERVAL, \