* 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. */
| 3355 | * segment. |
| 3356 | */ |
| 3357 | void |
| 3358 | ExecShutdownHash(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 |
no test coverage detected