diff --git a/src/backend/columnar/columnar_customscan.c b/src/backend/columnar/columnar_customscan.c index 5e5410116..baf569464 100644 --- a/src/backend/columnar/columnar_customscan.c +++ b/src/backend/columnar/columnar_customscan.c @@ -16,6 +16,9 @@ #include "miscadmin.h" +#include "nodes/execnodes.h" /* for ExprState, ExprContext, etc. */ +#include "executor/executor.h" /* for ExecInitExprWithParams(), ExecEvalExpr() */ +#include "commands/explain_format.h" /* for ExplainPropertyInteger() */ #include "access/amapi.h" #include "access/skey.h" #include "catalog/pg_am.h" diff --git a/src/backend/distributed/connection/worker_log_messages.c b/src/backend/distributed/connection/worker_log_messages.c index 7bce64050..96ab36613 100644 --- a/src/backend/distributed/connection/worker_log_messages.c +++ b/src/backend/distributed/connection/worker_log_messages.c @@ -16,6 +16,7 @@ #include "distributed/connection_management.h" #include "distributed/error_codes.h" #include "distributed/errormessage.h" +#include "utils/memutils.h" /* for TopTransactionContext */ #include "distributed/log_utils.h" #include "distributed/worker_log_messages.h" diff --git a/src/backend/distributed/planner/multi_explain.c b/src/backend/distributed/planner/multi_explain.c index 9972adfee..023dc4718 100644 --- a/src/backend/distributed/planner/multi_explain.c +++ b/src/backend/distributed/planner/multi_explain.c @@ -23,6 +23,7 @@ #include "commands/createas.h" #include "commands/dbcommands.h" #include "commands/explain.h" +#include "commands/explain_format.h" #include "commands/tablecmds.h" #include "executor/tstoreReceiver.h" #include "lib/stringinfo.h" @@ -42,6 +43,10 @@ #include "utils/json.h" #include "utils/lsyscache.h" #include "utils/snapmgr.h" +#if PG_VERSION_NUM >= PG_VERSION_18 +# include "commands/explain_dr.h" /* CreateExplainSerializeDestReceiver() */ +#endif + #include "pg_version_constants.h" #if PG_VERSION_NUM >= PG_VERSION_18 diff --git a/src/backend/distributed/planner/multi_logical_planner.c b/src/backend/distributed/planner/multi_logical_planner.c index d1e2e6bca..a42da71e9 100644 --- a/src/backend/distributed/planner/multi_logical_planner.c +++ b/src/backend/distributed/planner/multi_logical_planner.c @@ -34,6 +34,14 @@ #include "utils/relcache.h" #include "utils/syscache.h" +/* + * PG 18 renamed OpBtreeInterpretation to the more generic OpIndexInterpretation, + * so make the old name an alias. + */ +#if PG_VERSION_NUM >= PG_VERSION_18 +typedef OpIndexInterpretation OpBtreeInterpretation; +#endif + #include "pg_version_constants.h" #if PG_VERSION_NUM >= PG_VERSION_18 typedef OpIndexInterpretation OpBtreeInterpretation; diff --git a/src/backend/distributed/planner/shard_pruning.c b/src/backend/distributed/planner/shard_pruning.c index 7e58d1154..1ed8a3e57 100644 --- a/src/backend/distributed/planner/shard_pruning.c +++ b/src/backend/distributed/planner/shard_pruning.c @@ -84,6 +84,14 @@ #include "utils/memutils.h" #include "utils/ruleutils.h" +/* + * PG 18 renamed OpBtreeInterpretation to the more generic OpIndexInterpretation, + * so make the old name an alias. + */ +#if PG_VERSION_NUM >= PG_VERSION_18 +typedef OpIndexInterpretation OpBtreeInterpretation; +#endif + #include "pg_version_constants.h" #if PG_VERSION_NUM >= PG_VERSION_18 typedef OpIndexInterpretation OpBtreeInterpretation;