2015-09-29 03:55:57 +02:00
|
|
|
/*--------------------------------------------------------------------
|
|
|
|
* execParallel.h
|
|
|
|
* POSTGRES parallel execution interface
|
|
|
|
*
|
2017-01-03 19:48:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
|
2015-09-29 03:55:57 +02:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
|
|
|
* IDENTIFICATION
|
|
|
|
* src/include/executor/execParallel.h
|
|
|
|
*--------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EXECPARALLEL_H
|
|
|
|
#define EXECPARALLEL_H
|
|
|
|
|
|
|
|
#include "access/parallel.h"
|
|
|
|
#include "nodes/execnodes.h"
|
|
|
|
#include "nodes/parsenodes.h"
|
|
|
|
#include "nodes/plannodes.h"
|
2016-12-19 22:47:15 +01:00
|
|
|
#include "utils/dsa.h"
|
2015-09-29 03:55:57 +02:00
|
|
|
|
|
|
|
typedef struct SharedExecutorInstrumentation SharedExecutorInstrumentation;
|
|
|
|
|
|
|
|
typedef struct ParallelExecutorInfo
|
|
|
|
{
|
2016-06-10 00:02:36 +02:00
|
|
|
PlanState *planstate;
|
2015-09-29 03:55:57 +02:00
|
|
|
ParallelContext *pcxt;
|
|
|
|
BufferUsage *buffer_usage;
|
|
|
|
SharedExecutorInstrumentation *instrumentation;
|
|
|
|
shm_mq_handle **tqueue;
|
2016-12-19 22:47:15 +01:00
|
|
|
dsa_area *area;
|
2016-06-10 00:02:36 +02:00
|
|
|
bool finished;
|
|
|
|
} ParallelExecutorInfo;
|
2015-09-29 03:55:57 +02:00
|
|
|
|
|
|
|
extern ParallelExecutorInfo *ExecInitParallelPlan(PlanState *planstate,
|
|
|
|
EState *estate, int nworkers);
|
|
|
|
extern void ExecParallelFinish(ParallelExecutorInfo *pei);
|
2015-10-16 17:56:02 +02:00
|
|
|
extern void ExecParallelCleanup(ParallelExecutorInfo *pei);
|
2015-11-18 18:35:25 +01:00
|
|
|
extern void ExecParallelReinitialize(ParallelExecutorInfo *pei);
|
2015-09-29 03:55:57 +02:00
|
|
|
|
2017-04-15 05:50:16 +02:00
|
|
|
extern void ParallelQueryMain(dsm_segment *seg, shm_toc *toc);
|
|
|
|
|
2015-09-29 03:55:57 +02:00
|
|
|
#endif /* EXECPARALLEL_H */
|