diff --git a/src/backend/distributed/executor/citus_custom_scan.c b/src/backend/distributed/executor/citus_custom_scan.c index 9cc7196d2..055ac476b 100644 --- a/src/backend/distributed/executor/citus_custom_scan.c +++ b/src/backend/distributed/executor/citus_custom_scan.c @@ -124,8 +124,20 @@ static CustomExecMethods CoordinatorInsertSelectCustomExecMethods = { /* - * RegisterCitusCustomScanMethods ets PostgreSQL know about - * Citus' custom scan nodes. + * Let PostgreSQL know about Citus' custom scan nodes. + */ +void +RegisterCitusCustomScanMethods(void) +{ + RegisterCustomScanMethods(&RealTimeCustomScanMethods); + RegisterCustomScanMethods(&TaskTrackerCustomScanMethods); + RegisterCustomScanMethods(&RouterCustomScanMethods); + RegisterCustomScanMethods(&CoordinatorInsertSelectCustomScanMethods); + RegisterCustomScanMethods(&DelayedErrorCustomScanMethods); +} + + +/* * RealTimeCreateScan creates the scan state for real-time executor queries. */ static Node * @@ -269,6 +281,7 @@ CitusSelectBeginScan(CustomScanState *node, EState *estate, int eflags) /* just an empty function */ } + /* * CitusEndScan is used to clean up tuple store of the given custom scan state. */ diff --git a/src/backend/distributed/shared_library_init.c b/src/backend/distributed/shared_library_init.c index b34592e6e..588336e0f 100644 --- a/src/backend/distributed/shared_library_init.c +++ b/src/backend/distributed/shared_library_init.c @@ -189,6 +189,9 @@ _PG_init(void) /* make our additional node types known */ RegisterNodes(); + /* make our custom scan nodes known */ + RegisterCitusCustomScanMethods(); + /* intercept planner */ planner_hook = distributed_planner; diff --git a/src/include/distributed/citus_custom_scan.h b/src/include/distributed/citus_custom_scan.h index 42e6d66b9..2ef734e63 100644 --- a/src/include/distributed/citus_custom_scan.h +++ b/src/include/distributed/citus_custom_scan.h @@ -34,7 +34,7 @@ extern CustomScanMethods CoordinatorInsertSelectCustomScanMethods; extern CustomScanMethods DelayedErrorCustomScanMethods; -/* common functions for different executors */ +extern void RegisterCitusCustomScanMethods(void); extern void CitusExplainScan(CustomScanState *node, List *ancestors, struct ExplainState *es);