Apache Cloudberry version
main
What happened
Cloudberry does not currently support running a CustomScan provider
under parallel execution. When enable_parallel = on and the plan
tree contains a CustomScanState, the CB-specific parallel-execution
walkers either skip CustomScan or wire only a subset of the per-node
parallel hooks, so DSM segment allocation, worker initialisation, and
per-worker state recovery for CustomScan nodes do not behave the same
way as for built-in parallel-aware nodes (SeqScan, IndexScan, etc.).
The upstream-style walkers in src/backend/executor/execParallel.c
do handle T_CustomScanState, but the CB-specific Gp* walkers in
the same file are the ones that drive parallelism inside CB segments,
and the CustomScan branches there are incomplete.
Functions that need to grow CustomScan support
src/backend/executor/execParallel.c:
EstimateGpParallelDSMEntrySize() (line 1548)
InitializeGpParallelWorkers() (line 1622)
InitializeGpParallelDSMEntry() (line 1689)
src/backend/executor/execProcnode.c:
For reference, the existing parallel-CustomScan hook API in
src/include/executor/nodeCustom.h (ExecCustomScanEstimate,
ExecCustomScanInitializeDSM, ExecCustomScanReInitializeDSM,
ExecCustomScanInitializeWorker) is what the CB walkers should call;
the upstream walkers in the same file already demonstrate the calling
convention.
Why this matters
Cloudberry extensions that ship a CustomScan provider cannot rely on
parallel-aware execution today.
Tracking this as a single feature-gap issue so a CustomScan
provider in Cloudberry has a single reference point.
What you think should happen instead
No response
How to reproduce
none
Operating System
any
Anything else
No response
Are you willing to submit PR?
Code of Conduct
Apache Cloudberry version
main
What happened
Cloudberry does not currently support running a
CustomScanproviderunder parallel execution. When
enable_parallel = onand the plantree contains a
CustomScanState, the CB-specific parallel-executionwalkers either skip CustomScan or wire only a subset of the per-node
parallel hooks, so DSM segment allocation, worker initialisation, and
per-worker state recovery for CustomScan nodes do not behave the same
way as for built-in parallel-aware nodes (SeqScan, IndexScan, etc.).
The upstream-style walkers in
src/backend/executor/execParallel.cdo handle
T_CustomScanState, but the CB-specific Gp* walkers inthe same file are the ones that drive parallelism inside CB segments,
and the CustomScan branches there are incomplete.
Functions that need to grow CustomScan support
src/backend/executor/execParallel.c:EstimateGpParallelDSMEntrySize()(line 1548)InitializeGpParallelWorkers()(line 1622)InitializeGpParallelDSMEntry()(line 1689)src/backend/executor/execProcnode.c:planstate_walk_kids()For reference, the existing parallel-CustomScan hook API in
src/include/executor/nodeCustom.h(ExecCustomScanEstimate,ExecCustomScanInitializeDSM,ExecCustomScanReInitializeDSM,ExecCustomScanInitializeWorker) is what the CB walkers should call;the upstream walkers in the same file already demonstrate the calling
convention.
Why this matters
Cloudberry extensions that ship a
CustomScanprovider cannot rely onparallel-aware execution today.
Tracking this as a single feature-gap issue so a CustomScan
provider in Cloudberry has a single reference point.
What you think should happen instead
No response
How to reproduce
none
Operating System
any
Anything else
No response
Are you willing to submit PR?
Code of Conduct