mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Parallel executor support.
This code provides infrastructure for a parallel leader to start up parallel workers to execute subtrees of the plan tree being executed in the master. User-supplied parameters from ParamListInfo are passed down, but PARAM_EXEC parameters are not. Various other constructs, such as initplans, subplans, and CTEs, are also not currently shared. Nevertheless, there's enough here to support a basic implementation of parallel query, and we can lift some of the current restrictions as needed. Amit Kapila and Robert Haas
This commit is contained in:
36
src/include/executor/execParallel.h
Normal file
36
src/include/executor/execParallel.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*--------------------------------------------------------------------
|
||||
* execParallel.h
|
||||
* POSTGRES parallel execution interface
|
||||
*
|
||||
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
|
||||
* 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"
|
||||
|
||||
typedef struct SharedExecutorInstrumentation SharedExecutorInstrumentation;
|
||||
|
||||
typedef struct ParallelExecutorInfo
|
||||
{
|
||||
PlanState *planstate;
|
||||
ParallelContext *pcxt;
|
||||
BufferUsage *buffer_usage;
|
||||
SharedExecutorInstrumentation *instrumentation;
|
||||
shm_mq_handle **tqueue;
|
||||
} ParallelExecutorInfo;
|
||||
|
||||
extern ParallelExecutorInfo *ExecInitParallelPlan(PlanState *planstate,
|
||||
EState *estate, int nworkers);
|
||||
extern void ExecParallelFinish(ParallelExecutorInfo *pei);
|
||||
|
||||
#endif /* EXECPARALLEL_H */
|
Reference in New Issue
Block a user