mirror of
https://github.com/postgres/postgres.git
synced 2025-07-11 10:01:57 +03:00
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
This commit is contained in:
@ -1716,11 +1716,12 @@ ExecIndexScanReInitializeDSM(IndexScanState *node,
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
ExecIndexScanInitializeWorker(IndexScanState *node, shm_toc *toc)
|
||||
ExecIndexScanInitializeWorker(IndexScanState *node,
|
||||
ParallelWorkerContext *pwcxt)
|
||||
{
|
||||
ParallelIndexScanDesc piscan;
|
||||
|
||||
piscan = shm_toc_lookup(toc, node->ss.ps.plan->plan_node_id, false);
|
||||
piscan = shm_toc_lookup(pwcxt->toc, node->ss.ps.plan->plan_node_id, false);
|
||||
node->iss_ScanDesc =
|
||||
index_beginscan_parallel(node->ss.ss_currentRelation,
|
||||
node->iss_RelationDesc,
|
||||
|
Reference in New Issue
Block a user