Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 959ee6d

Browse files
committed
pg_upgrade: simplify code layout in a few places
Backpatch-through: 9.4 (9.3 didn't need improving)
1 parent df9f682 commit 959ee6d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/bin/pg_upgrade/exec.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ exec_prog(const char *log_file, const char *opt_log_file,
112112
pg_log(PG_VERBOSE, "%s\n", cmd);
113113

114114
#ifdef WIN32
115-
116115
/*
117116
* For some reason, Windows issues a file-in-use error if we write data to
118117
* 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,
194193
}
195194

196195
#ifndef WIN32
197-
198196
/*
199197
* We can't do this on Windows because it will keep the "pg_ctl start"
200198
* output filename open until the server stops, so we do the \n\n above on

src/bin/pg_upgrade/server.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,8 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
310310
* running.
311311
*/
312312
if (!pg_ctl_return)
313-
{
314-
if (cluster == &old_cluster)
315-
pg_fatal("pg_ctl failed to start the source server, or connection failed\n");
316-
else
317-
pg_fatal("pg_ctl failed to start the target server, or connection failed\n");
318-
}
313+
pg_fatal("pg_ctl failed to start the %s server, or connection failed\n",
314+
cluster == &old_cluster ? "source" : "target");
319315

320316
return true;
321317
}

0 commit comments

Comments
 (0)