---------------------------------------------------------------- * ExecSortEstimate * * Estimate space required to propagate sort statistics. * ---------------------------------------------------------------- */
| 506 | * ---------------------------------------------------------------- |
| 507 | */ |
| 508 | void |
| 509 | ExecSortEstimate(SortState *node, ParallelContext *pcxt) |
| 510 | { |
| 511 | Size size; |
| 512 | |
| 513 | /* don't need this if not instrumenting or no workers */ |
| 514 | if (!node->ss.ps.instrument || pcxt->nworkers == 0) |
| 515 | return; |
| 516 | |
| 517 | size = mul_size(pcxt->nworkers, sizeof(TuplesortInstrumentation)); |
| 518 | size = add_size(size, offsetof(SharedSortInfo, sinstrument)); |
| 519 | shm_toc_estimate_chunk(&pcxt->estimator, size); |
| 520 | shm_toc_estimate_keys(&pcxt->estimator, 1); |
| 521 | } |
| 522 | |
| 523 | /* ---------------------------------------------------------------- |
| 524 | * ExecSortInitializeDSM |
no test coverage detected