execParallel.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*--------------------------------------------------------------------
  2. * execParallel.h
  3. * POSTGRES parallel execution interface
  4. *
  5. * Portions Copyright (c) 1996-2016, 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. typedef struct SharedExecutorInstrumentation SharedExecutorInstrumentation;
  19. typedef struct ParallelExecutorInfo
  20. {
  21. PlanState *planstate;
  22. ParallelContext *pcxt;
  23. BufferUsage *buffer_usage;
  24. SharedExecutorInstrumentation *instrumentation;
  25. shm_mq_handle **tqueue;
  26. bool finished;
  27. } ParallelExecutorInfo;
  28. extern ParallelExecutorInfo *ExecInitParallelPlan(PlanState *planstate,
  29. EState *estate, int nworkers);
  30. extern void ExecParallelFinish(ParallelExecutorInfo *pei);
  31. extern void ExecParallelCleanup(ParallelExecutorInfo *pei);
  32. extern void ExecParallelReinitialize(ParallelExecutorInfo *pei);
  33. extern void ParallelQueryMain(dsm_segment *seg, shm_toc *toc);
  34. #endif /* EXECPARALLEL_H */