gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
2.0KB

  1. /*--------------------------------------------------------------------
  2. * execParallel.h
  3. * POSTGRES parallel execution interface
  4. *
  5. * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  6. * Portions Copyright (c) 1994, Regents of the University of California
  7. *
  8. * IDENTIFICATION
  9. * src/include/executor/execParallel.h
  10. *--------------------------------------------------------------------
  11. */
  12. #ifndef EXECPARALLEL_H
  13. #define EXECPARALLEL_H
  14. #include "access/parallel.h"
  15. #include "nodes/execnodes.h"
  16. #include "nodes/parsenodes.h"
  17. #include "nodes/plannodes.h"
  18. #include "utils/dsa.h"
  19. typedef struct SharedExecutorInstrumentation SharedExecutorInstrumentation;
  20. typedef struct ParallelExecutorInfo
  21. {
  22. PlanState *planstate; /* plan subtree we're running in parallel */
  23. ParallelContext *pcxt; /* parallel context we're using */
  24. BufferUsage *buffer_usage; /* points to bufusage area in DSM */
  25. SharedExecutorInstrumentation *instrumentation; /* optional */
  26. struct SharedJitInstrumentation *jit_instrumentation; /* optional */
  27. dsa_area *area; /* points to DSA area in DSM */
  28. dsa_pointer param_exec; /* serialized PARAM_EXEC parameters */
  29. bool finished; /* set true by ExecParallelFinish */
  30. /* These two arrays have pcxt->nworkers_launched entries: */
  31. shm_mq_handle **tqueue; /* tuple queues for worker output */
  32. struct TupleQueueReader **reader; /* tuple reader/writer support */
  33. } ParallelExecutorInfo;
  34. extern ParallelExecutorInfo *ExecInitParallelPlan(PlanState *planstate,
  35. EState *estate, Bitmapset *sendParam, int nworkers,
  36. int64 tuples_needed);
  37. extern void ExecParallelCreateReaders(ParallelExecutorInfo *pei);
  38. extern void ExecParallelFinish(ParallelExecutorInfo *pei);
  39. extern void ExecParallelCleanup(ParallelExecutorInfo *pei);
  40. extern void ExecParallelReinitialize(PlanState *planstate,
  41. ParallelExecutorInfo *pei, Bitmapset *sendParam);
  42. extern void ParallelQueryMain(dsm_segment *seg, shm_toc *toc);
  43. #endif /* EXECPARALLEL_H */
上海开阖软件有限公司 沪ICP备12045867号-1