mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix pg_upgrade's use of pg_ctl on Win32 to not send command and sever
output to the same file, because it is impossible. Also set user name for pg_dumpall in pg_upgrade.
This commit is contained in:
@ -174,12 +174,10 @@ parseCommandLine(migratorContext *ctx, int argc, char *argv[])
|
||||
* start.
|
||||
*/
|
||||
/* truncate */
|
||||
ctx->log_fd = fopen(ctx->logfile, "w");
|
||||
if (!ctx->log_fd)
|
||||
if ((ctx->log_fd = fopen(ctx->logfile, "w")) == NULL)
|
||||
pg_log(ctx, PG_FATAL, "Cannot write to log file %s\n", ctx->logfile);
|
||||
fclose(ctx->log_fd);
|
||||
ctx->log_fd = fopen(ctx->logfile, "a");
|
||||
if (!ctx->log_fd)
|
||||
if ((ctx->log_fd = fopen(ctx->logfile, "a")) == NULL)
|
||||
pg_log(ctx, PG_FATAL, "Cannot write to log file %s\n", ctx->logfile);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user