-
Notifications
You must be signed in to change notification settings - Fork 253
/
repmgrd.h
34 lines (24 loc) · 897 Bytes
/
repmgrd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* repmgrd.h
* Copyright (c) EnterpriseDB Corporation, 2010-2021
*/
#ifndef _REPMGRD_H_
#define _REPMGRD_H_
#include <time.h>
#include "portability/instr_time.h"
#define OPT_NO_PID_FILE 1000
#define OPT_DAEMONIZE 1001
extern volatile sig_atomic_t got_SIGHUP;
extern MonitoringState monitoring_state;
extern instr_time degraded_monitoring_start;
extern t_node_info local_node_info;
extern PGconn *local_conn;
extern bool startup_event_logged;
extern char pid_file[MAXPGPATH];
bool check_upstream_connection(PGconn **conn, const char *conninfo, PGconn **paired_conn);
void try_reconnect(PGconn **conn, t_node_info *node_info);
int calculate_elapsed(instr_time start_time);
const char *print_monitoring_state(MonitoringState monitoring_state);
void update_registration(PGconn *conn);
void terminate(int retval);
#endif /* _REPMGRD_H_ */