summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHash.c
diff options
context:
space:
mode:
authorRobert Haas2017-12-19 17:21:56 +0000
committerRobert Haas2017-12-19 17:21:56 +0000
commit8526bcb2df76d5171b4f4d6dc7a97560a73a5eff (patch)
tree8fd13e8cc570a6f996b9162ff4c76ce9190b3f0f /src/backend/executor/nodeHash.c
parent38fc54703ea4203a537c58332f697c546eaa4bcf (diff)
Try again to fix accumulation of parallel worker instrumentation.
When a Gather or Gather Merge node is started and stopped multiple times, accumulate instrumentation data only once, at the end, instead of after each execution, to avoid recording inflated totals. Commit 778e78ae9fa51e58f41cbdc72b293291d02d8984, the previous attempt at a fix, instead reset the state after every execution, which worked for the general instrumentation data but had problems for the additional instrumentation specific to Sort and Hash nodes. Report by hubert depesz lubaczewski. Analysis and fix by Amit Kapila, following a design proposal from Thomas Munro, with a comment tweak by me. Discussion: http://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/executor/nodeHash.c')
-rw-r--r--src/backend/executor/nodeHash.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index 6fe5d69d558..afd7384e945 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -1670,19 +1670,6 @@ ExecHashInitializeDSM(HashState *node, ParallelContext *pcxt)
}
/*
- * Reset shared state before beginning a fresh scan.
- */
-void
-ExecHashReInitializeDSM(HashState *node, ParallelContext *pcxt)
-{
- if (node->shared_info != NULL)
- {
- memset(node->shared_info->hinstrument, 0,
- node->shared_info->num_workers * sizeof(HashInstrumentation));
- }
-}
-
-/*
* Locate the DSM space for hash table instrumentation data that we'll write
* to at shutdown time.
*/