From efc1052c9b17086fff7c3b9e5a433e872e52d6b6 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Fri, 3 Jun 2016 18:42:23 +0300 Subject: [PATCH] Remove unused 'rewindPlanIDs' fields. The copy/out/read functions for it were wrong: a Bitmapset is not a Node, so one should use e.g. COPY_BITMAPSET_FIELD() instead of COPY_NODE_FIELD() for them. But since the fields are currently unused, let's just remove them. These fields will be resurrected soon, by the PostgreSQL 8.3 merge, as they were introduced in PostgreSQL 8.3. Then they will actually be used, too. --- src/backend/executor/nodeSubplan.c | 1 - src/backend/nodes/copyfuncs.c | 1 - src/backend/nodes/outfast.c | 1 - src/backend/nodes/outfuncs.c | 2 -- src/backend/nodes/readfast.c | 1 - src/backend/optimizer/plan/planner.c | 3 --- src/backend/optimizer/util/clauses.c | 1 - src/include/nodes/plannodes.h | 2 -- src/include/nodes/relation.h | 2 -- 9 files changed, 14 deletions(-) diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c index a6cbac5803..facfa48111 100644 --- a/src/backend/executor/nodeSubplan.c +++ b/src/backend/executor/nodeSubplan.c @@ -1016,7 +1016,6 @@ SubplanQueryDesc(QueryDesc * qd) substmt->utilityStmt = stmt->utilityStmt; substmt->intoClause = NULL; substmt->subplans = stmt->subplans; - substmt->rewindPlanIDs = stmt->rewindPlanIDs; substmt->returningLists = stmt->returningLists; substmt->rowMarks = stmt->rowMarks; substmt->relationOids = stmt->relationOids; diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 790f8742e0..cc0bf18ab4 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -167,7 +167,6 @@ _copyPlannedStmt(PlannedStmt *from) COPY_NODE_FIELD(utilityStmt); COPY_NODE_FIELD(intoClause); COPY_NODE_FIELD(subplans); - COPY_NODE_FIELD(rewindPlanIDs); COPY_NODE_FIELD(returningLists); COPY_NODE_FIELD(result_partitions); diff --git a/src/backend/nodes/outfast.c b/src/backend/nodes/outfast.c index 91b96ef4de..03f1e57323 100644 --- a/src/backend/nodes/outfast.c +++ b/src/backend/nodes/outfast.c @@ -336,7 +336,6 @@ _outPlannedStmt(StringInfo str, PlannedStmt *node) WRITE_NODE_FIELD(utilityStmt); WRITE_NODE_FIELD(intoClause); WRITE_NODE_FIELD(subplans); - WRITE_NODE_FIELD(rewindPlanIDs); WRITE_NODE_FIELD(returningLists); WRITE_NODE_FIELD(result_partitions); diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 571488aeeb..55125ededb 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -301,7 +301,6 @@ _outPlannedStmt(StringInfo str, PlannedStmt *node) WRITE_NODE_FIELD(utilityStmt); WRITE_NODE_FIELD(intoClause); WRITE_NODE_FIELD(subplans); - WRITE_NODE_FIELD(rewindPlanIDs); WRITE_NODE_FIELD(returningLists); WRITE_NODE_FIELD(result_partitions); @@ -1935,7 +1934,6 @@ _outPlannerGlobal(StringInfo str, PlannerGlobal *node) WRITE_NODE_FIELD(paramlist); WRITE_NODE_FIELD(subplans); WRITE_NODE_FIELD(subrtables); - WRITE_BITMAPSET_FIELD(rewindPlanIDs); WRITE_NODE_FIELD(finalrtable); WRITE_NODE_FIELD(relationOids); WRITE_NODE_FIELD(invalItems); diff --git a/src/backend/nodes/readfast.c b/src/backend/nodes/readfast.c index c14d1a5081..4f26011c60 100644 --- a/src/backend/nodes/readfast.c +++ b/src/backend/nodes/readfast.c @@ -1424,7 +1424,6 @@ _readPlannedStmt(void) READ_NODE_FIELD(utilityStmt); READ_NODE_FIELD(intoClause); READ_NODE_FIELD(subplans); - READ_NODE_FIELD(rewindPlanIDs); READ_NODE_FIELD(returningLists); READ_NODE_FIELD(result_partitions); READ_NODE_FIELD(result_aosegnos); diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 1d6eac67b3..dc1ac663bd 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -178,7 +178,6 @@ static void postprocess_plan(PlannedStmt *plan) /* initialize */ globNew->paramlist = NIL; globNew->subrtables = NIL; - globNew->rewindPlanIDs = NULL; globNew->finalrtable = NIL; globNew->relationOids = NIL; globNew->invalItems = NIL; @@ -344,7 +343,6 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) glob->paramlist = NIL; glob->subplans = NIL; glob->subrtables = NIL; - glob->rewindPlanIDs = NULL; glob->finalrtable = NIL; glob->relationOids = NIL; glob->invalItems = NIL; @@ -486,7 +484,6 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) result->utilityStmt = parse->utilityStmt; result->intoClause = parse->intoClause; result->subplans = glob->subplans; - result->rewindPlanIDs = glob->rewindPlanIDs; result->returningLists = root->returningLists; result->result_partitions = root->result_partitions; result->result_aosegnos = root->result_aosegnos; diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 450d4a8cc1..9e25293b8d 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -4505,7 +4505,6 @@ flatten_join_alias_var_optimizer(Query *query, int queryLevel) root->glob->paramlist = NIL; root->glob->subplans = NIL; root->glob->subrtables = NIL; - root->glob->rewindPlanIDs = NULL; root->glob->finalrtable = NIL; root->glob->relationOids = NIL; root->glob->invalItems = NIL; diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 604106eff4..7ab52f3026 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -94,8 +94,6 @@ typedef struct PlannedStmt List *subplans; /* Plan trees for SubPlan expressions */ - Bitmapset *rewindPlanIDs; /* indices of subplans that require REWIND */ - /* * If the query has a returningList then the planner will store a list of * processed targetlists (one per result relation) here. We must have a diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index efe7808f42..9f18ce3a08 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -94,8 +94,6 @@ typedef struct PlannerGlobal List *subrtables; /* Rangetables for SubPlan nodes */ - Bitmapset *rewindPlanIDs; /* indices of subplans that require REWIND */ - List *finalrtable; /* "flat" rangetable for executor */ List *relationOids; /* OIDs of relations the plan depends on */ -- GitLab