aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2018-01-05 14:11:15 -0500
committerBruce Momjian <bruce@momjian.us>2018-01-05 14:11:15 -0500
commit959ee6d267fb24e667fc64e9837a376e236e84a5 (patch)
tree3c278930f59ec9bec298ae91a72f5b1824858c9c /src
parentdf9f682c7bf81674b6ae3900fd0146f35df0ae2e (diff)
downloadpostgresql-959ee6d267fb24e667fc64e9837a376e236e84a5.tar.gz
postgresql-959ee6d267fb24e667fc64e9837a376e236e84a5.zip
pg_upgrade: simplify code layout in a few places
Backpatch-through: 9.4 (9.3 didn't need improving)
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/exec.c2
-rw-r--r--src/bin/pg_upgrade/server.c8
2 files changed, 2 insertions, 8 deletions
diff --git a/src/bin/pg_upgrade/exec.c b/src/bin/pg_upgrade/exec.c
index 1fa56b8c61f..ea454342221 100644
--- a/src/bin/pg_upgrade/exec.c
+++ b/src/bin/pg_upgrade/exec.c
@@ -112,7 +112,6 @@ exec_prog(const char *log_file, const char *opt_log_file,
pg_log(PG_VERBOSE, "%s\n", cmd);
#ifdef WIN32
-
/*
* 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
@@ -194,7 +193,6 @@ exec_prog(const char *log_file, const char *opt_log_file,
}
#ifndef WIN32
-
/*
* 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
diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c
index 96181237f8d..1b399a9841e 100644
--- a/src/bin/pg_upgrade/server.c
+++ b/src/bin/pg_upgrade/server.c
@@ -310,12 +310,8 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
* running.
*/
if (!pg_ctl_return)
- {
- if (cluster == &old_cluster)
- 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");
- }
+ pg_fatal("pg_ctl failed to start the %s server, or connection failed\n",
+ cluster == &old_cluster ? "source" : "target");
return true;
}