summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeHash.c')
-rw-r--r--src/backend/executor/nodeHash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index c26b8ea44e3..70553b8fdf9 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -2582,9 +2582,13 @@ ExecHashInitializeWorker(HashState *node, ParallelWorkerContext *pwcxt)
{
SharedHashInfo *shared_info;
+ /* might not be there ... */
shared_info = (SharedHashInfo *)
shm_toc_lookup(pwcxt->toc, node->ps.plan->plan_node_id, true);
- node->hinstrument = &shared_info->hinstrument[ParallelWorkerNumber];
+ if (shared_info)
+ node->hinstrument = &shared_info->hinstrument[ParallelWorkerNumber];
+ else
+ node->hinstrument = NULL;
}
/*