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

Function ExecHashEstimate

src/backend/executor/nodeHash.c:3286–3299  ·  view source on GitHub ↗

* Reserve space in the DSM segment for instrumentation data. */

Source from the content-addressed store, hash-verified

3284 * Reserve space in the DSM segment for instrumentation data.
3285 */
3286void
3287ExecHashEstimate(HashState *node, ParallelContext *pcxt)
3288{
3289 size_t size;
3290
3291 /* don't need this if not instrumenting or no workers */
3292 if (!node->ps.instrument || pcxt->nworkers == 0)
3293 return;
3294
3295 size = mul_size(pcxt->nworkers, sizeof(HashInstrumentation));
3296 size = add_size(size, offsetof(SharedHashInfo, hinstrument));
3297 shm_toc_estimate_chunk(&pcxt->estimator, size);
3298 shm_toc_estimate_keys(&pcxt->estimator, 1);
3299}
3300
3301/*
3302 * Set up a space in the DSM for all workers to record instrumentation data

Callers 2

ExecParallelEstimateFunction · 0.85

Calls 2

mul_sizeFunction · 0.85
add_sizeFunction · 0.85

Tested by

no test coverage detected