Blind attempt at fixing Win32 pg_dump issues
authorAlvaro Herrera
Tue, 14 Oct 2014 20:33:36 +0000 (17:33 -0300)
committerAlvaro Herrera
Tue, 14 Oct 2014 20:33:36 +0000 (17:33 -0300)
Per buildfarm failures

src/bin/pg_dump/parallel.c
src/bin/pg_dump/pg_backup_utils.c

index 3b8d5848b3a811c581abcabfedf76fad16213c81..54abecbc09132b2c66b5fac2201cbb3772dc0316 100644 (file)
@@ -47,6 +47,7 @@ typedef struct
 {
    ArchiveHandle *AH;
    RestoreOptions *ropt;
+   DumpOptions *dopt;
    int         worker;
    int         pipeRead;
    int         pipeWrite;
@@ -464,12 +465,13 @@ init_spawned_worker_win32(WorkerInfo *wi)
    ArchiveHandle *AH;
    int         pipefd[2] = {wi->pipeRead, wi->pipeWrite};
    int         worker = wi->worker;
+   DumpOptions *dopt = wi->dopt;
    RestoreOptions *ropt = wi->ropt;
 
    AH = CloneArchive(wi->AH);
 
    free(wi);
-   SetupWorker(AH, pipefd, worker, ropt);
+   SetupWorker(AH, pipefd, worker, dopt, ropt);
 
    DeCloneArchive(AH);
    _endthreadex(0);
@@ -546,6 +548,7 @@ ParallelBackupStart(ArchiveHandle *AH, DumpOptions *dopt, RestoreOptions *ropt)
        wi = (WorkerInfo *) pg_malloc(sizeof(WorkerInfo));
 
        wi->ropt = ropt;
+       wi->dopt = dopt;
        wi->worker = i;
        wi->AH = AH;
        wi->pipeRead = pstate->parallelSlot[i].pipeRevRead = pipeMW[PIPE_READ];
index 0d7c6dbbf079810a98d4f81261b8d1990d3b596c..47cb142fa57799146c96b3f24404aadd69f3a336 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include "postgres_fe.h"
 
+#include "parallel.h"
 #include "pg_backup_utils.h"
 
 /* Globals exported by this file */