"standby promote": make timeout values configurable

This introduces following new configuration file parameters, which
were previously hard-coded values:

 - promote_check_timeout
 - promote_check_interval

Implements GitHub #387.
This commit is contained in:
Ian Barwick
2018-02-27 10:04:58 +09:00
parent a3f371b8c0
commit 63a11f8926
6 changed files with 65 additions and 10 deletions

View File

@@ -82,7 +82,7 @@ typedef struct
char log_file[MAXLEN];
int log_status_interval;
/* standby action settings */
/* standby clone settings */
bool use_replication_slots;
char pg_basebackup_options[MAXLEN];
char restore_command[MAXLEN];
@@ -92,6 +92,10 @@ typedef struct
bool use_primary_conninfo_password;
char passfile[MAXPGPATH];
/* standby promote settings */
int promote_check_timeout;
int promote_check_interval;
/* node check settings */
int archive_ready_warning;
int archive_ready_critical;
@@ -159,6 +163,8 @@ typedef struct
"", "", "", DEFAULT_LOG_STATUS_INTERVAL, \
/* standby action settings */ \
false, "", "", { NULL, NULL }, "", false, false, "", \
/* standby promote settings */ \
DEFAULT_PROMOTE_CHECK_TIMEOUT, DEFAULT_PROMOTE_CHECK_INTERVAL, \
/* node check settings */ \
DEFAULT_ARCHIVE_READY_WARNING, DEFAULT_ARCHIVE_READY_CRITICAL, \
DEFAULT_REPLICATION_LAG_WARNING, DEFAULT_REPLICATION_LAG_CRITICAL, \