mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
pg_upgrade: detect stale postmaster.pid lock files
If the postmaster.pid lock file exists, try starting/stopping the cluster to check if the lock file is valid. Per request from Tom.
This commit is contained in:
@@ -307,7 +307,7 @@ extern OSInfo os_info;
|
||||
|
||||
/* check.c */
|
||||
|
||||
void output_check_banner(bool *live_check);
|
||||
void output_check_banner(bool live_check);
|
||||
void check_and_dump_old_cluster(bool live_check,
|
||||
char **sequence_script_file_name);
|
||||
void check_new_cluster(void);
|
||||
@@ -341,7 +341,7 @@ exec_prog(const char *log_file, const char *opt_log_file,
|
||||
bool throw_error, const char *fmt,...)
|
||||
__attribute__((format(PG_PRINTF_ATTRIBUTE, 4, 5)));
|
||||
void verify_directories(void);
|
||||
bool is_server_running(const char *datadir);
|
||||
bool pid_lock_file_exists(const char *datadir);
|
||||
|
||||
|
||||
/* file.c */
|
||||
@@ -429,7 +429,7 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3)));
|
||||
|
||||
char *cluster_conn_opts(ClusterInfo *cluster);
|
||||
|
||||
void start_postmaster(ClusterInfo *cluster);
|
||||
bool start_postmaster(ClusterInfo *cluster, bool throw_error);
|
||||
void stop_postmaster(bool fast);
|
||||
uint32 get_major_server_version(ClusterInfo *cluster);
|
||||
void check_pghost_envvar(void);
|
||||
|
Reference in New Issue
Block a user