MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecShutdownHash

Function ExecShutdownHash

src/backend/executor/nodeHash.c:3357–3367  ·  view source on GitHub ↗

* Collect EXPLAIN stats if needed, saving them into DSM memory if * ExecHashInitializeWorker was called, or local storage if not. In the * parallel case, this must be done in ExecShutdownHash() rather than * ExecEndHash() because the latter runs after we've detached from the DSM * segment. */

Source from the content-addressed store, hash-verified

3355 * segment.
3356 */
3357void
3358ExecShutdownHash(HashState *node)
3359{
3360 /* Allocate save space if EXPLAIN'ing and we didn't do so already */
3361 if (node->ps.instrument && !node->hinstrument)
3362 node->hinstrument = (HashInstrumentation *)
3363 palloc0(sizeof(HashInstrumentation));
3364 /* Now accumulate data for the current (final) hash table */
3365 if (node->hinstrument && node->hashtable)
3366 ExecHashAccumInstrumentation(node->hinstrument, node->hashtable);
3367}
3368
3369/*
3370 * Retrieve instrumentation data from workers before the DSM segment is

Callers 1

ExecShutdownNodeFunction · 0.85

Calls 2

palloc0Function · 0.50

Tested by

no test coverage detected