48 pg_fatal(
"could not get pg_ctl version data using %s: %m", cmd);
52 pg_fatal(
"could not get pg_ctl version data using %s: %s",
56 pg_fatal(
"could not get pg_ctl version output from %s", cmd);
93#define MAXCMDLEN (2 * MAXPGPATH)
152 for (iter = 0; iter < 4 &&
log ==
NULL; iter++)
199 "Consult the last few lines of \"%s\" or \"%s\" for\n"
200 "the probable cause of the failure.",
204 "Consult the last few lines of \"%s\" for\n"
205 "the probable cause of the failure.",
245 pg_fatal(
"could not open file \"%s\" for reading: %m", path);
271 pg_fatal(
"You must have read and write access in the current directory.");
437 snprintf(path,
sizeof(path),
"%s/%s", dir, program);
440 pg_fatal(
"check for \"%s\" failed: %m", path);
442 snprintf(cmd,
sizeof(cmd),
"\"%s\" -V", path);
445 pg_fatal(
"check for \"%s\" failed: cannot execute",
455 pg_fatal(
"check for \"%s\" failed: incorrect version: found \"%s\", expected \"%s\"",
bool exec_prog(const char *log_filename, const char *opt_log_file, bool report_error, bool exit_on_error, const char *fmt,...)
static void check_exec(const char *dir, const char *program, bool check_version)
bool pid_lock_file_exists(const char *datadir)
static void check_single_dir(const char *pg_data, const char *subdir)
static void check_bin_dir(ClusterInfo *cluster, bool check_versions)
static void check_data_dir(ClusterInfo *cluster)
void verify_directories(void)
static void get_bin_version(ClusterInfo *cluster)
void cluster(ParseState *pstate, ClusterStmt *stmt, bool isTopLevel)
int validate_exec(const char *path)
char * pipe_read_line(char *cmd)
#define fprintf(file, fmt, msg)
uint32 get_pg_version(const char *datadir, char **version_str)
#define GLOBALS_DUMP_FILE
void void pg_log(eLogType type, const char *fmt,...) pg_attribute_printf(2
#define GET_MAJOR_VERSION(v)
void report_status(eLogType type, const char *fmt,...) pg_attribute_printf(2
static int fd(const char *x, int i)
void pg_usleep(long microsec)
int pg_strip_crlf(char *str)
char * wait_result_to_str(int exitstatus)