*strchr(cmd_output, '\n') = '\0';
if (sscanf(cmd_output, "%*s %*s %d.%d", &pre_dot, &post_dot) < 1)
- pg_fatal("could not get version from %s\n", cmd);
+ pg_fatal("could not get pg_ctl version output from %s\n", cmd);
cluster->bin_version = (pre_dot * 100 + post_dot) * 100;
}
#endif
if (log == NULL)
- pg_fatal("cannot write to log file %s\n", log_file);
+ pg_fatal("could not write to log file \"%s\"\n", log_file);
#ifdef WIN32
/* Are we printing "command:" before its output? */
* log these commands to a third file, but that just adds complexity.
*/
if ((log = fopen(log_file, "a")) == NULL)
- pg_fatal("cannot write to log file %s\n", log_file);
+ pg_fatal("could not write to log file \"%s\"\n", log_file);
fprintf(log, "\n\n");
fclose(log);
#endif
pg_fatal("check for \"%s\" failed: %s\n",
path, strerror(errno));
else if (!S_ISREG(buf.st_mode))
- pg_fatal("check for \"%s\" failed: not an executable file\n",
+ pg_fatal("check for \"%s\" failed: not a regular file\n",
path);
/*
pg_fatal("%s: cannot be run as root\n", os_info.progname);
if ((log_opts.internal = fopen_priv(INTERNAL_LOG_FILE, "a")) == NULL)
- pg_fatal("cannot write to log file %s\n", INTERNAL_LOG_FILE);
+ pg_fatal("could not write to log file \"%s\"\n", INTERNAL_LOG_FILE);
while ((option = getopt_long(argc, argv, "d:D:b:B:cj:ko:O:p:P:rU:v",
long_options, &optindex)) != -1)
for (filename = output_files; *filename != NULL; filename++)
{
if ((fp = fopen_priv(*filename, "a")) == NULL)
- pg_fatal("cannot write to log file %s\n", *filename);
+ pg_fatal("could not write to log file \"%s\"\n", *filename);
/* Start with newline because we might be appending to a file. */
fprintf(fp, "\n"
canonicalize_path(new_cluster_pgdata);
if (!getcwd(cwd, MAXPGPATH))
- pg_fatal("cannot find current directory\n");
+ pg_fatal("could not determine current directory\n");
canonicalize_path(cwd);
if (path_is_prefix_of_path(new_cluster_pgdata, cwd))
pg_fatal("cannot run pg_upgrade from inside the new cluster data directory on Windows\n");
/* Use the current directory for the socket */
cluster->sockdir = pg_malloc(MAXPGPATH);
if (!getcwd(cluster->sockdir, MAXPGPATH))
- pg_fatal("cannot find current directory\n");
+ pg_fatal("could not determine current directory\n");
}
else
{
snprintf(filename, sizeof(filename), "%s/postmaster.pid",
cluster->pgdata);
if ((fp = fopen(filename, "r")) == NULL)
- pg_fatal("Cannot open file %s: %m\n", filename);
+ pg_fatal("could not open file \"%s\": %s\n",
+ filename, strerror(errno));
for (lineno = 1;
lineno <= Max(LOCK_FILE_LINE_PORT, LOCK_FILE_LINE_SOCKET_DIR);
lineno++)
{
if (fgets(line, sizeof(line), fp) == NULL)
- pg_fatal("Cannot read line %d from %s: %m\n", lineno, filename);
+ pg_fatal("could not read line %d from file \"%s\": %s\n",
+ lineno, filename, strerror(errno));
/* potentially overwrite user-supplied value */
if (lineno == LOCK_FILE_LINE_PORT)
/* warn of port number correction */
if (orig_port != DEF_PGUPORT && old_cluster.port != orig_port)
- pg_log(PG_WARNING, "User-supplied old port number %hu corrected to %hu\n",
+ pg_log(PG_WARNING, "user-supplied old port number %hu corrected to %hu\n",
orig_port, cluster->port);
}
}
* datfrozenxid, relfrozenxids, and relminmxid later to match the new xid
* counter later.
*/
- prep_status("Freezing all rows on the new cluster");
+ prep_status("Freezing all rows in the new cluster");
exec_prog(UTILITY_LOG_FILE, NULL, true,
"\"%s/vacuumdb\" %s --all --freeze %s",
new_cluster.bindir, cluster_conn_opts(&new_cluster),
*/
remove_new_subdir("pg_multixact/offsets", false);
- prep_status("Setting oldest multixact ID on new cluster");
+ prep_status("Setting oldest multixact ID in new cluster");
/*
* We don't preserve files in this case, but it's important that the