Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit959ee6d

Browse files
committed
pg_upgrade: simplify code layout in a few places
Backpatch-through: 9.4 (9.3 didn't need improving)
1 parentdf9f682 commit959ee6d

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
#ifdefWIN32
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
#ifndefWIN32
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)

[8]ページ先頭

©2009-2025 Movatter.jp