---------------------------------------------------------------- * ExecSortEstimate * * Estimate space required to propagate sort statistics. * ---------------------------------------------------------------- */
| 1187 | * ---------------------------------------------------------------- |
| 1188 | */ |
| 1189 | void |
| 1190 | ExecIncrementalSortEstimate(IncrementalSortState *node, ParallelContext *pcxt) |
| 1191 | { |
| 1192 | Size size; |
| 1193 | |
| 1194 | /* don't need this if not instrumenting or no workers */ |
| 1195 | if (!node->ss.ps.instrument || pcxt->nworkers == 0) |
| 1196 | return; |
| 1197 | |
| 1198 | size = mul_size(pcxt->nworkers, sizeof(IncrementalSortInfo)); |
| 1199 | size = add_size(size, offsetof(SharedIncrementalSortInfo, sinfo)); |
| 1200 | shm_toc_estimate_chunk(&pcxt->estimator, size); |
| 1201 | shm_toc_estimate_keys(&pcxt->estimator, 1); |
| 1202 | } |
| 1203 | |
| 1204 | /* ---------------------------------------------------------------- |
| 1205 | * ExecSortInitializeDSM |
no test coverage detected