|
4 | 4 | * database server functions |
5 | 5 | * |
6 | 6 | * Copyright (c) 2010, PostgreSQL Global Development Group |
7 | | - * $PostgreSQL: pgsql/contrib/pg_upgrade/server.c,v 1.8 2010/07/06 19:18:55 momjian Exp $ |
| 7 | + * $PostgreSQL: pgsql/contrib/pg_upgrade/server.c,v 1.9 2010/07/13 20:03:32 momjian Exp $ |
8 | 8 | */ |
9 | 9 |
|
10 | 10 | #include "pg_upgrade.h" |
@@ -181,21 +181,21 @@ start_postmaster(migratorContext *ctx, Cluster whichCluster, bool quiet) |
181 | 181 | } |
182 | 182 |
|
183 | 183 | /* |
184 | | - * On Win32, we can't send both server output and pg_ctl output to the |
| 184 | + * On Win32, we can't send both pg_upgrade output and pg_ctl output to the |
185 | 185 | * same file because we get the error: "The process cannot access the file |
186 | | - * because it is being used by another process." so we have to send pg_ctl |
| 186 | + * because it is being used by another process." so we have to send all other |
187 | 187 | * output to 'nul'. |
188 | 188 | */ |
189 | 189 | snprintf(cmd, sizeof(cmd), |
190 | 190 | SYSTEMQUOTE "\"%s/pg_ctl\" -l \"%s\" -D \"%s\" " |
191 | 191 | "-o \"-p %d -c autovacuum=off " |
192 | 192 | "-c autovacuum_freeze_max_age=2000000000\" " |
193 | 193 | "start >> \"%s\" 2>&1" SYSTEMQUOTE, |
194 | | - bindir, ctx->logfile, datadir, port, |
| 194 | + bindir, |
195 | 195 | #ifndef WIN32 |
196 | | - ctx->logfile); |
| 196 | + ctx->logfile, datadir, port, ctx->logfile); |
197 | 197 | #else |
198 | | - DEVNULL); |
| 198 | + DEVNULL, datadir, port, DEVNULL); |
199 | 199 | #endif |
200 | 200 | exec_prog(ctx, true, "%s", cmd); |
201 | 201 |
|
@@ -235,11 +235,11 @@ stop_postmaster(migratorContext *ctx, bool fast, bool quiet) |
235 | 235 | snprintf(cmd, sizeof(cmd), |
236 | 236 | SYSTEMQUOTE "\"%s/pg_ctl\" -l \"%s\" -D \"%s\" %s stop >> " |
237 | 237 | "\"%s\" 2>&1" SYSTEMQUOTE, |
238 | | - bindir, ctx->logfile, datadir, fast ? "-m fast" : "", |
| 238 | + bindir, |
239 | 239 | #ifndef WIN32 |
240 | | - ctx->logfile); |
| 240 | + ctx->logfile, datadir, fast ? "-m fast" : "", ctx->logfile); |
241 | 241 | #else |
242 | | - DEVNULL); |
| 242 | + DEVNULL, datadir, fast ? "-m fast" : "", DEVNULL); |
243 | 243 | #endif |
244 | 244 | exec_prog(ctx, fast ? false : true, "%s", cmd); |
245 | 245 |
|
|
0 commit comments