mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
In pg_upgrade, fix the -l/log option to work on Windows.
Also, double-quote the log file name in all places, to allow (on all platforms) log file names with spaces. Back patch to 9.0 and 9.1.
This commit is contained in:
@ -199,6 +199,16 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
char *filename; /* name of log file (may be /dev/null) */
|
||||
/*
|
||||
* WIN32 files do not accept writes from multiple processes
|
||||
*
|
||||
* On Win32, we can't send both pg_upgrade output and command 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'. Therefore, we set this to DEVNULL on Win32, and
|
||||
* it equals 'filename' on all other platforms.
|
||||
*/
|
||||
char *filename2;
|
||||
FILE *fd; /* log FILE */
|
||||
bool debug; /* TRUE -> log more information */
|
||||
FILE *debug_fd; /* debug-level log FILE */
|
||||
|
Reference in New Issue
Block a user