---------------------------------------------------------------- * ExecIndexScanInitializeDSM * * Set up a parallel index scan descriptor. * ---------------------------------------------------------------- */
| 1690 | * ---------------------------------------------------------------- |
| 1691 | */ |
| 1692 | void |
| 1693 | ExecIndexScanInitializeDSM(IndexScanState *node, |
| 1694 | ParallelContext *pcxt) |
| 1695 | { |
| 1696 | EState *estate = node->ss.ps.state; |
| 1697 | ParallelIndexScanDesc piscan; |
| 1698 | |
| 1699 | piscan = shm_toc_allocate(pcxt->toc, node->iss_PscanLen); |
| 1700 | index_parallelscan_initialize(node->ss.ss_currentRelation, |
| 1701 | node->iss_RelationDesc, |
| 1702 | estate->es_snapshot, |
| 1703 | piscan); |
| 1704 | shm_toc_insert(pcxt->toc, node->ss.ps.plan->plan_node_id, piscan); |
| 1705 | node->iss_ScanDesc = |
| 1706 | index_beginscan_parallel(node->ss.ss_currentRelation, |
| 1707 | node->iss_RelationDesc, |
| 1708 | node->iss_NumScanKeys, |
| 1709 | node->iss_NumOrderByKeys, |
| 1710 | piscan); |
| 1711 | |
| 1712 | /* |
| 1713 | * If no run-time keys to calculate or they are ready, go ahead and pass |
| 1714 | * the scankeys to the index AM. |
| 1715 | */ |
| 1716 | if (node->iss_NumRuntimeKeys == 0 || node->iss_RuntimeKeysReady) |
| 1717 | index_rescan(node->iss_ScanDesc, |
| 1718 | node->iss_ScanKeys, node->iss_NumScanKeys, |
| 1719 | node->iss_OrderByKeys, node->iss_NumOrderByKeys); |
| 1720 | } |
| 1721 | |
| 1722 | /* ---------------------------------------------------------------- |
| 1723 | * ExecIndexScanReInitializeDSM |
no test coverage detected