]> granicus.if.org Git - postgresql/blobdiff - contrib/pg_upgrade/pg_upgrade.h
In pg_upgrade, fix the -l/log option to work on Windows.
[postgresql] / contrib / pg_upgrade / pg_upgrade.h
index 4729ac39d91d5d68b45291ea387dee6af98ffcbb..df884bd684b6f4cbf0a2ab9cdecd6da28f738f60 100644 (file)
@@ -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 */