added config options sleep_delay and sleep_monitor

sleep_monitor replaces the old SLEEP_MONITOR define and makes it
configurable; this is the interval in which we monitor

sleep_delay replaces the old sleep(300) when waiting for the master to
recover.
This commit is contained in:
Christian Kruse
2014-01-17 13:50:12 +01:00
parent a7d3c9b93a
commit 5fc4a0382f
5 changed files with 30 additions and 9 deletions

View File

@@ -43,9 +43,11 @@ typedef struct
char pg_bindir[MAXLEN];
char pgctl_options[MAXLEN];
char logfile[MAXLEN];
int sleep_monitor;
int sleep_delay;
} t_configuration_options;
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "" }
#define T_CONFIGURATION_OPTIONS_INITIALIZER { "", -1, "", MANUAL_FAILOVER, -1, "", "", "", "", "", "", "", -1, -1, -1, "", "", "", 0, 0 }
void parse_config(const char *config_file, t_configuration_options *options);
void parse_line(char *buff, char *name, char *value);