repmgrd: add option "connection_check_type"

This enable selection of the method repmgrd uses to check whether the upstream
node is available. Possible values are:

 - "ping" (default): uses PQping() to check server availability
 - "connection":  executes a query on the connection to check server
   availability (similar to repmgr3.x).
This commit is contained in:
Ian Barwick
2019-03-06 12:07:30 +09:00
parent 4f83111033
commit 63f7ad546e
11 changed files with 150 additions and 23 deletions

View File

@@ -23,6 +23,7 @@ extern PGconn *local_conn;
extern bool startup_event_logged;
extern char pid_file[MAXPGPATH];
bool check_upstream_connection(PGconn *conn, const char *conninfo);
void try_reconnect(PGconn **conn, t_node_info *node_info);
int calculate_elapsed(instr_time start_time);
@@ -31,5 +32,4 @@ const char *print_monitoring_state(MonitoringState monitoring_state);
void update_registration(PGconn *conn);
void terminate(int retval);
#endif /* _REPMGRD_H_ */