MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecSeqScanInitializeDSM

Function ExecSeqScanInitializeDSM

src/backend/executor/nodeSeqscan.c:328–359  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecSeqScanInitializeDSM * * Set up a parallel heap scan descriptor. * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

326 * ----------------------------------------------------------------
327 */
328void
329ExecSeqScanInitializeDSM(SeqScanState *node,
330 ParallelContext *pcxt)
331{
332 EState *estate = node->ss.ps.state;
333 ParallelTableScanDesc pscan;
334 TableScanDesc scandesc;
335
336 pscan = shm_toc_allocate(pcxt->toc, node->pscan_len);
337
338 Assert(pscan);
339
340 table_parallelscan_initialize(node->ss.ss_currentRelation,
341 pscan,
342 estate->es_snapshot);
343 shm_toc_insert(pcxt->toc, node->ss.ps.plan->plan_node_id, pscan);
344 if (node->ss.ss_currentRelation->rd_tableam->scan_begin_extractcolumns)
345 {
346 /* try parallel mode for AOCO extract columns */
347 scandesc = table_beginscan_es(node->ss.ss_currentRelation,
348 estate->es_snapshot,
349 0, NULL,
350 pscan,
351 &node->ss.ps);
352 }
353 else
354 {
355 /* normal parallel mode */
356 scandesc = table_beginscan_parallel(node->ss.ss_currentRelation, pscan);
357 }
358 node->ss.ss_currentScanDesc = scandesc;
359}
360
361/* ----------------------------------------------------------------
362 * ExecSeqScanReInitializeDSM

Callers 2

Calls 5

shm_toc_allocateFunction · 0.85
shm_toc_insertFunction · 0.85
table_beginscan_esFunction · 0.85
table_beginscan_parallelFunction · 0.85

Tested by

no test coverage detected