summaryrefslogtreecommitdiff
path: root/src/include/access/parallel.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-08-02 16:09:09 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-08-02 16:09:09 -0400
commit93ac14efb465d3160a77b5f75dad8e4721cee41a (patch)
tree2369d99588738b1171557163ea4fdefbbe206246 /src/include/access/parallel.h
parent89c30d1133be5ba4da6098da2ee12114e527f03b (diff)
Sync 9.5 version of access/transam/parallel.c with HEAD.
This back-patches commit a5fe473ad (notably, marking ParallelMessagePending as volatile, which is not particularly optional). I also back-patched some previous cosmetic changes to remove unnecessary diffs between the two branches. I'm unsure how much of this code is actually reachable in 9.5, but to the extent that it is reachable, it needs to be maintained, and minimizing cross-branch diffs will make that easier.
Diffstat (limited to 'src/include/access/parallel.h')
-rw-r--r--src/include/access/parallel.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h
index 44f0616cb86..4ac46fce57a 100644
--- a/src/include/access/parallel.h
+++ b/src/include/access/parallel.h
@@ -19,7 +19,6 @@
#include "postmaster/bgworker.h"
#include "storage/shm_mq.h"
#include "storage/shm_toc.h"
-#include "utils/elog.h"
typedef void (*parallel_worker_main_type) (dsm_segment *seg, shm_toc *toc);
@@ -46,7 +45,7 @@ typedef struct ParallelContext
ParallelWorkerInfo *worker;
} ParallelContext;
-extern bool ParallelMessagePending;
+extern volatile bool ParallelMessagePending;
extern int ParallelWorkerNumber;
extern bool InitializingParallelWorker;
@@ -54,16 +53,16 @@ extern bool InitializingParallelWorker;
extern ParallelContext *CreateParallelContext(parallel_worker_main_type entrypoint, int nworkers);
extern ParallelContext *CreateParallelContextForExternalFunction(char *library_name, char *function_name, int nworkers);
-extern void InitializeParallelDSM(ParallelContext *);
-extern void LaunchParallelWorkers(ParallelContext *);
-extern void WaitForParallelWorkersToFinish(ParallelContext *);
-extern void DestroyParallelContext(ParallelContext *);
+extern void InitializeParallelDSM(ParallelContext *pcxt);
+extern void LaunchParallelWorkers(ParallelContext *pcxt);
+extern void WaitForParallelWorkersToFinish(ParallelContext *pcxt);
+extern void DestroyParallelContext(ParallelContext *pcxt);
extern bool ParallelContextActive(void);
extern void HandleParallelMessageInterrupt(void);
extern void HandleParallelMessages(void);
extern void AtEOXact_Parallel(bool isCommit);
extern void AtEOSubXact_Parallel(bool isCommit, SubTransactionId mySubId);
-extern void ParallelWorkerReportLastRecEnd(XLogRecPtr);
+extern void ParallelWorkerReportLastRecEnd(XLogRecPtr last_xlog_end);
#endif /* PARALLEL_H */