pg_upgrade: simplify code layout in a few places
Backpatch-through: 9.4 (9.3 didn't need improving)
This commit is contained in:
parent
df9f682c7b
commit
959ee6d267
@ -112,7 +112,6 @@ exec_prog(const char *log_file, const char *opt_log_file,
|
|||||||
pg_log(PG_VERBOSE, "%s\n", cmd);
|
pg_log(PG_VERBOSE, "%s\n", cmd);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For some reason, Windows issues a file-in-use error if we write data to
|
* For some reason, Windows issues a file-in-use error if we write data to
|
||||||
* the log file from a non-primary thread just before we create a
|
* the log file from a non-primary thread just before we create a
|
||||||
@ -194,7 +193,6 @@ exec_prog(const char *log_file, const char *opt_log_file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We can't do this on Windows because it will keep the "pg_ctl start"
|
* We can't do this on Windows because it will keep the "pg_ctl start"
|
||||||
* output filename open until the server stops, so we do the \n\n above on
|
* output filename open until the server stops, so we do the \n\n above on
|
||||||
|
@ -310,12 +310,8 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
|
|||||||
* running.
|
* running.
|
||||||
*/
|
*/
|
||||||
if (!pg_ctl_return)
|
if (!pg_ctl_return)
|
||||||
{
|
pg_fatal("pg_ctl failed to start the %s server, or connection failed\n",
|
||||||
if (cluster == &old_cluster)
|
cluster == &old_cluster ? "source" : "target");
|
||||||
pg_fatal("pg_ctl failed to start the source server, or connection failed\n");
|
|
||||||
else
|
|
||||||
pg_fatal("pg_ctl failed to start the target server, or connection failed\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user