mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
repmgrd: create pid file by default
Traditionally repmgrd will only write a pidfile if explicitly requested with -p/--pid-file. However it's normally desirable to have a pidfile, and it's preferable to have one used by default to prevent accidentally starting a second repmgrd instance. Following changes made: - add configuration file parameter "repmgrd_pid_file" (initially overridden by -p/--pid-file for backwards compatibility, though eventually we'll want to drop -p/--pid-file altogether) - add command line option --no-pid-file - if neither "repmgrd_pid_file" nor -p/--pid-file is set, create the pid file in a temporary directory Implements GitHub #457.
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <time.h>
|
||||
#include "portability/instr_time.h"
|
||||
|
||||
#define OPT_NO_PID_FILE 1000
|
||||
|
||||
extern volatile sig_atomic_t got_SIGHUP;
|
||||
extern MonitoringState monitoring_state;
|
||||
extern instr_time degraded_monitoring_start;
|
||||
@@ -26,4 +28,6 @@ const char *print_monitoring_state(MonitoringState monitoring_state);
|
||||
|
||||
void update_registration(PGconn *conn);
|
||||
void terminate(int retval);
|
||||
|
||||
|
||||
#endif /* _REPMGRD_H_ */
|
||||
|
||||
Reference in New Issue
Block a user