Skip to content

Add custom nodes gpdb#372

Draft
Alena0704 wants to merge 2 commits intoOPENGPDB_STABLEfrom
add-custom-nodes-gpdb
Draft

Add custom nodes gpdb#372
Alena0704 wants to merge 2 commits intoOPENGPDB_STABLEfrom
add-custom-nodes-gpdb

Conversation

@Alena0704
Copy link
Copy Markdown
Contributor

Port CustomScan and ExtensibleNode infrastructure from PostgreSQL to Greenplum

Add support for custom scan nodes, allowing extensions to define
their own scan strategies that integrate with the planner, executor,
EXPLAIN, and GPDB's CDB dispatch pipeline.

New node types: T_CustomScan, T_CustomScanState, T_CustomPath,
T_ExtensibleNode. New files: extensible.h/c (registration framework),
nodeCustom.h/c (executor callbacks). Full binary serialization support
for plan dispatch to segments. Includes set_rel_pathlist_hook for
planner extensibility and a test extension (custom_scan_test) that
replaces SeqScan with a CustomScan to validate the pipeline end-to-end.

custom_scan_test extension is an example how to use it and simple example to check that it works

Alena0704 and others added 2 commits April 7, 2026 17:47
…Greenplum

Add support for custom scan nodes, allowing extensions to define
their own scan strategies that integrate with the planner, executor,
EXPLAIN, and GPDB's CDB dispatch pipeline.

New node types: T_CustomScan, T_CustomScanState, T_CustomPath,
T_ExtensibleNode. New files: extensible.h/c (registration framework),
nodeCustom.h/c (executor callbacks). Full binary serialization support
for plan dispatch to segments. Includes set_rel_pathlist_hook for
planner extensibility and a test extension (custom_scan_test) that
replaces SeqScan with a CustomScan to validate the pipeline end-to-end.
Comment on lines +102 to +105
if (tlistvarno == INDEX_VAR)
ExecAssignScanProjectionInfo(&css->ss);
else
ExecAssignScanProjectionInfo(&css->ss);
Copy link
Copy Markdown
Contributor

@NJrslv NJrslv Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about two identical branches? I also don't see this code in the upstream, can you please point to the code you are porting from?

I see that upstream has different code in some places but I don't know if it's okay or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is from Postgresql code master branch
I tried to move custom nodes in gpdb because some features requires their own algorithms or path preparation logic.

@Alena0704 Alena0704 marked this pull request as draft April 13, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants