---------------------------------------------------------------- * ExecAggEstimate * * Estimate space required to propagate aggregate statistics. * ---------------------------------------------------------------- */
| 5064 | * ---------------------------------------------------------------- |
| 5065 | */ |
| 5066 | void |
| 5067 | ExecAggEstimate(AggState *node, ParallelContext *pcxt) |
| 5068 | { |
| 5069 | Size size; |
| 5070 | |
| 5071 | /* don't need this if not instrumenting or no workers */ |
| 5072 | if (!node->ss.ps.instrument || pcxt->nworkers == 0) |
| 5073 | return; |
| 5074 | |
| 5075 | size = mul_size(pcxt->nworkers, sizeof(AggregateInstrumentation)); |
| 5076 | size = add_size(size, offsetof(SharedAggInfo, sinstrument)); |
| 5077 | shm_toc_estimate_chunk(&pcxt->estimator, size); |
| 5078 | shm_toc_estimate_keys(&pcxt->estimator, 1); |
| 5079 | } |
| 5080 | |
| 5081 | /* ---------------------------------------------------------------- |
| 5082 | * ExecAggInitializeDSM |
no test coverage detected