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

Commit4504a1b

Browse files
committed
On Win32, pg_upgrade cannot sent any server log output to the log file
because of file access limitations on that platform.
1 parent477c01b commit4504a1b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎contrib/pg_upgrade/server.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*database server functions
55
*
66
*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 $
88
*/
99

1010
#include"pg_upgrade.h"
@@ -181,21 +181,21 @@ start_postmaster(migratorContext *ctx, Cluster whichCluster, bool quiet)
181181
}
182182

183183
/*
184-
* On Win32, we can't send bothserver output and pg_ctl output to the
184+
* On Win32, we can't send bothpg_upgrade output and pg_ctl output to the
185185
* 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 sendpg_ctl
186+
* because it is being used by another process." so we have to sendall other
187187
* output to 'nul'.
188188
*/
189189
snprintf(cmd,sizeof(cmd),
190190
SYSTEMQUOTE"\"%s/pg_ctl\" -l \"%s\" -D \"%s\" "
191191
"-o \"-p %d -c autovacuum=off "
192192
"-c autovacuum_freeze_max_age=2000000000\" "
193193
"start >> \"%s\" 2>&1"SYSTEMQUOTE,
194-
bindir,ctx->logfile,datadir,port,
194+
bindir,
195195
#ifndefWIN32
196-
ctx->logfile);
196+
ctx->logfile,datadir,port,ctx->logfile);
197197
#else
198-
DEVNULL);
198+
DEVNULL,datadir,port,DEVNULL);
199199
#endif
200200
exec_prog(ctx, true,"%s",cmd);
201201

@@ -235,11 +235,11 @@ stop_postmaster(migratorContext *ctx, bool fast, bool quiet)
235235
snprintf(cmd,sizeof(cmd),
236236
SYSTEMQUOTE"\"%s/pg_ctl\" -l \"%s\" -D \"%s\" %s stop >> "
237237
"\"%s\" 2>&1"SYSTEMQUOTE,
238-
bindir,ctx->logfile,datadir,fast ?"-m fast" :"",
238+
bindir,
239239
#ifndefWIN32
240-
ctx->logfile);
240+
ctx->logfile,datadir,fast ?"-m fast" :"",ctx->logfile);
241241
#else
242-
DEVNULL);
242+
DEVNULL,datadir,fast ?"-m fast" :"",DEVNULL);
243243
#endif
244244
exec_prog(ctx,fast ? false : true,"%s",cmd);
245245

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp