---------------------------------------------------------------- * ExecIndexScanInitializeWorker * * Copy relevant information from TOC into planstate. * ---------------------------------------------------------------- */
| 1739 | * ---------------------------------------------------------------- |
| 1740 | */ |
| 1741 | void |
| 1742 | ExecIndexScanInitializeWorker(IndexScanState *node, |
| 1743 | ParallelWorkerContext *pwcxt) |
| 1744 | { |
| 1745 | ParallelIndexScanDesc piscan; |
| 1746 | |
| 1747 | piscan = shm_toc_lookup(pwcxt->toc, node->ss.ps.plan->plan_node_id, false); |
| 1748 | node->iss_ScanDesc = |
| 1749 | index_beginscan_parallel(node->ss.ss_currentRelation, |
| 1750 | node->iss_RelationDesc, |
| 1751 | node->iss_NumScanKeys, |
| 1752 | node->iss_NumOrderByKeys, |
| 1753 | piscan); |
| 1754 | |
| 1755 | /* |
| 1756 | * If no run-time keys to calculate or they are ready, go ahead and pass |
| 1757 | * the scankeys to the index AM. |
| 1758 | */ |
| 1759 | if (node->iss_NumRuntimeKeys == 0 || node->iss_RuntimeKeysReady) |
| 1760 | index_rescan(node->iss_ScanDesc, |
| 1761 | node->iss_ScanKeys, node->iss_NumScanKeys, |
| 1762 | node->iss_OrderByKeys, node->iss_NumOrderByKeys); |
| 1763 | } |
no test coverage detected