diff options
author | Andres Freund <andres@anarazel.de> | 2017-11-16 17:28:11 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2017-11-16 17:39:18 -0800 |
commit | 7082e614c0dd504cdf49c4d5a692159f22e78f9d (patch) | |
tree | 21aab7cbd15866af06b423cd90c6b97520b248bc /src/include/access/parallel.h | |
parent | 09a777447a858a01ac4d547d678ba295d9542c3b (diff) |
Provide DSM segment to ExecXXXInitializeWorker functions.
Previously, executor nodes running in parallel worker processes didn't
have access to the dsm_segment object used for parallel execution. In
order to support resource management based on DSM segment lifetime,
they need that. So create a ParallelWorkerContext object to hold it
and pass it to all InitializeWorker functions.
Author: Thomas Munro
Reviewed-By: Andres Freund
Discussion: https://postgr.es/m/CAEepm=2W=cOkiZxcg6qiFQP-dHUe09aqTrEMM7yJDrHMhDv_RA@mail.gmail.com
Diffstat (limited to 'src/include/access/parallel.h')
-rw-r--r-- | src/include/access/parallel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h index e3e0cecf1ea..f4db88294aa 100644 --- a/src/include/access/parallel.h +++ b/src/include/access/parallel.h @@ -45,6 +45,12 @@ typedef struct ParallelContext ParallelWorkerInfo *worker; } ParallelContext; +typedef struct ParallelWorkerContext +{ + dsm_segment *seg; + shm_toc *toc; +} ParallelWorkerContext; + extern volatile bool ParallelMessagePending; extern int ParallelWorkerNumber; extern bool InitializingParallelWorker; |