Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
execParallel.h52 linesDownload Raw Back to executor
1/*--------------------------------------------------------------------2 * execParallel.h3 *		POSTGRES parallel execution interface4 *5 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group6 * Portions Copyright (c) 1994, Regents of the University of California7 *8 * IDENTIFICATION9 *		src/include/executor/execParallel.h10 *--------------------------------------------------------------------11 */12 13#ifndef EXECPARALLEL_H14#define EXECPARALLEL_H15 16#include "access/parallel.h"17#include "nodes/execnodes.h"18#include "nodes/parsenodes.h"19#include "nodes/plannodes.h"20#include "utils/dsa.h"21 22typedef struct SharedExecutorInstrumentation SharedExecutorInstrumentation;23 24typedef struct ParallelExecutorInfo25{26	PlanState  *planstate;		/* plan subtree we're running in parallel */27	ParallelContext *pcxt;		/* parallel context we're using */28	BufferUsage *buffer_usage;	/* points to bufusage area in DSM */29	WalUsage   *wal_usage;		/* walusage area in DSM */30	SharedExecutorInstrumentation *instrumentation; /* optional */31	struct SharedJitInstrumentation *jit_instrumentation;	/* optional */32	dsa_area   *area;			/* points to DSA area in DSM */33	dsa_pointer param_exec;		/* serialized PARAM_EXEC parameters */34	bool		finished;		/* set true by ExecParallelFinish */35	/* These two arrays have pcxt->nworkers_launched entries: */36	shm_mq_handle **tqueue;		/* tuple queues for worker output */37	struct TupleQueueReader **reader;	/* tuple reader/writer support */38} ParallelExecutorInfo;39 40extern ParallelExecutorInfo *ExecInitParallelPlan(PlanState *planstate,41												  EState *estate, Bitmapset *sendParams, int nworkers,42												  int64 tuples_needed);43extern void ExecParallelCreateReaders(ParallelExecutorInfo *pei);44extern void ExecParallelFinish(ParallelExecutorInfo *pei);45extern void ExecParallelCleanup(ParallelExecutorInfo *pei);46extern void ExecParallelReinitialize(PlanState *planstate,47									 ParallelExecutorInfo *pei, Bitmapset *sendParams);48 49extern void ParallelQueryMain(dsm_segment *seg, shm_toc *toc);50 51#endif							/* EXECPARALLEL_H */52 
codekingpro/portable-devtools · Team Ai