Commit 076d29a1 authored by Alvaro Herrera's avatar Alvaro Herrera

Blind attempt at fixing Win32 pg_dump issues

Per buildfarm failures
parent 0eea8047
...@@ -47,6 +47,7 @@ typedef struct ...@@ -47,6 +47,7 @@ typedef struct
{ {
ArchiveHandle *AH; ArchiveHandle *AH;
RestoreOptions *ropt; RestoreOptions *ropt;
DumpOptions *dopt;
int worker; int worker;
int pipeRead; int pipeRead;
int pipeWrite; int pipeWrite;
...@@ -464,12 +465,13 @@ init_spawned_worker_win32(WorkerInfo *wi) ...@@ -464,12 +465,13 @@ init_spawned_worker_win32(WorkerInfo *wi)
ArchiveHandle *AH; ArchiveHandle *AH;
int pipefd[2] = {wi->pipeRead, wi->pipeWrite}; int pipefd[2] = {wi->pipeRead, wi->pipeWrite};
int worker = wi->worker; int worker = wi->worker;
DumpOptions *dopt = wi->dopt;
RestoreOptions *ropt = wi->ropt; RestoreOptions *ropt = wi->ropt;
AH = CloneArchive(wi->AH); AH = CloneArchive(wi->AH);
free(wi); free(wi);
SetupWorker(AH, pipefd, worker, ropt); SetupWorker(AH, pipefd, worker, dopt, ropt);
DeCloneArchive(AH); DeCloneArchive(AH);
_endthreadex(0); _endthreadex(0);
...@@ -546,6 +548,7 @@ ParallelBackupStart(ArchiveHandle *AH, DumpOptions *dopt, RestoreOptions *ropt) ...@@ -546,6 +548,7 @@ ParallelBackupStart(ArchiveHandle *AH, DumpOptions *dopt, RestoreOptions *ropt)
wi = (WorkerInfo *) pg_malloc(sizeof(WorkerInfo)); wi = (WorkerInfo *) pg_malloc(sizeof(WorkerInfo));
wi->ropt = ropt; wi->ropt = ropt;
wi->dopt = dopt;
wi->worker = i; wi->worker = i;
wi->AH = AH; wi->AH = AH;
wi->pipeRead = pstate->parallelSlot[i].pipeRevRead = pipeMW[PIPE_READ]; wi->pipeRead = pstate->parallelSlot[i].pipeRevRead = pipeMW[PIPE_READ];
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
#include "parallel.h"
#include "pg_backup_utils.h" #include "pg_backup_utils.h"
/* Globals exported by this file */ /* Globals exported by this file */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment