diff options
| author | Robert Haas | 2016-12-19 21:47:15 +0000 |
|---|---|---|
| committer | Robert Haas | 2016-12-19 22:11:46 +0000 |
| commit | e13029a5ce353574516c64fd1ec9c50201e705fd (patch) | |
| tree | 529cb354f9f3a41fe0678d2733cf303ed62030df /src/include | |
| parent | 2604438472c897fbbd1568b1a8ee177ba8cdb6e3 (diff) | |
Provide a DSA area for all parallel queries.
This will allow future parallel query code to dynamically allocate
storage shared by all participants.
Thomas Munro, with assorted changes by me.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/executor/execParallel.h | 2 | ||||
| -rw-r--r-- | src/include/nodes/execnodes.h | 3 | ||||
| -rw-r--r-- | src/include/storage/lwlock.h | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/include/executor/execParallel.h b/src/include/executor/execParallel.h index f4c6d37a119..4bbee691a7f 100644 --- a/src/include/executor/execParallel.h +++ b/src/include/executor/execParallel.h @@ -17,6 +17,7 @@ #include "nodes/execnodes.h" #include "nodes/parsenodes.h" #include "nodes/plannodes.h" +#include "utils/dsa.h" typedef struct SharedExecutorInstrumentation SharedExecutorInstrumentation; @@ -27,6 +28,7 @@ typedef struct ParallelExecutorInfo BufferUsage *buffer_usage; SharedExecutorInstrumentation *instrumentation; shm_mq_handle **tqueue; + dsa_area *area; bool finished; } ParallelExecutorInfo; diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 703604ab9d7..5c3b8683f5b 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -427,6 +427,9 @@ typedef struct EState HeapTuple *es_epqTuple; /* array of EPQ substitute tuples */ bool *es_epqTupleSet; /* true if EPQ tuple is provided */ bool *es_epqScanDone; /* true if EPQ tuple has been fetched */ + + /* The per-query shared memory area to use for parallel execution. */ + struct dsa_area *es_query_dsa; } EState; diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index db1c687e21e..3ca4db0a723 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -210,6 +210,7 @@ typedef enum BuiltinTrancheIds LWTRANCHE_BUFFER_MAPPING, LWTRANCHE_LOCK_MANAGER, LWTRANCHE_PREDICATE_LOCK_MANAGER, + LWTRANCHE_PARALLEL_QUERY_DSA, LWTRANCHE_FIRST_USER_DEFINED } BuiltinTrancheIds; |
