Index: contrib/pg_upgrade/server.c
===================================================================
RCS file: /cvsroot/pgsql/contrib/pg_upgrade/server.c,v
retrieving revision 1.8
diff -c -c -r1.8 server.c
*** contrib/pg_upgrade/server.c	6 Jul 2010 19:18:55 -0000	1.8
--- contrib/pg_upgrade/server.c	13 Jul 2010 20:00:41 -0000
***************
*** 181,189 ****
  	}
  
  	/*
! 	 * On Win32, we can't send both server output and pg_ctl output to the
  	 * same file because we get the error: "The process cannot access the file
! 	 * because it is being used by another process." so we have to send pg_ctl
  	 * output to 'nul'.
  	 */
  	snprintf(cmd, sizeof(cmd),
--- 181,189 ----
  	}
  
  	/*
! 	 * On Win32, we can't send both pg_upgrade output and pg_ctl output to the
  	 * same file because we get the error: "The process cannot access the file
! 	 * because it is being used by another process." so we have to send all other
  	 * output to 'nul'.
  	 */
  	snprintf(cmd, sizeof(cmd),
***************
*** 191,201 ****
  			 "-o \"-p %d -c autovacuum=off "
  			 "-c autovacuum_freeze_max_age=2000000000\" "
  			 "start >> \"%s\" 2>&1" SYSTEMQUOTE,
! 			 bindir, ctx->logfile, datadir, port,
  #ifndef WIN32
! 			 ctx->logfile);
  #else
! 			 DEVNULL);
  #endif
  	exec_prog(ctx, true, "%s", cmd);
  
--- 191,201 ----
  			 "-o \"-p %d -c autovacuum=off "
  			 "-c autovacuum_freeze_max_age=2000000000\" "
  			 "start >> \"%s\" 2>&1" SYSTEMQUOTE,
! 			 bindir,
  #ifndef WIN32
! 			 ctx->logfile, datadir, port, ctx->logfile);
  #else
! 			 DEVNULL, datadir, port, DEVNULL);
  #endif
  	exec_prog(ctx, true, "%s", cmd);
  
***************
*** 235,245 ****
  	snprintf(cmd, sizeof(cmd),
  			 SYSTEMQUOTE "\"%s/pg_ctl\" -l \"%s\" -D \"%s\" %s stop >> "
  			 "\"%s\" 2>&1" SYSTEMQUOTE,
! 			 bindir, ctx->logfile, datadir, fast ? "-m fast" : "",
  #ifndef WIN32
! 			 ctx->logfile);
  #else
! 			 DEVNULL);
  #endif
  	exec_prog(ctx, fast ? false : true, "%s", cmd);
  
--- 235,245 ----
  	snprintf(cmd, sizeof(cmd),
  			 SYSTEMQUOTE "\"%s/pg_ctl\" -l \"%s\" -D \"%s\" %s stop >> "
  			 "\"%s\" 2>&1" SYSTEMQUOTE,
! 			 bindir,
  #ifndef WIN32
! 			 ctx->logfile, datadir, fast ? "-m fast" : "", ctx->logfile);
  #else
! 			 DEVNULL, datadir, fast ? "-m fast" : "", DEVNULL);
  #endif
  	exec_prog(ctx, fast ? false : true, "%s", cmd);
  
