diff options
Diffstat (limited to 'src/include/nodes')
-rw-r--r-- | src/include/nodes/execnodes.h | 1 | ||||
-rw-r--r-- | src/include/nodes/pathnodes.h | 6 | ||||
-rw-r--r-- | src/include/nodes/plannodes.h | 14 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 18e572f1712..a2008846c63 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -614,6 +614,7 @@ typedef struct EState struct ExecRowMark **es_rowmarks; /* Array of per-range-table-entry * ExecRowMarks, or NULL if none */ PlannedStmt *es_plannedstmt; /* link to top of plan tree */ + List *es_part_prune_infos; /* PlannedStmt.partPruneInfos */ const char *es_sourceText; /* Source text from QueryDesc */ JunkFilter *es_junkFilter; /* top-level junk filter, if any */ diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index ef95429a0d0..dd4eb8679df 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -122,6 +122,9 @@ typedef struct PlannerGlobal /* "flat" list of AppendRelInfos */ List *appendRelations; + /* List of PartitionPruneInfo contained in the plan */ + List *partPruneInfos; + /* OIDs of relations the plan depends on */ List *relationOids; @@ -503,6 +506,9 @@ struct PlannerInfo /* Does this query modify any partition key columns? */ bool partColsUpdated; + + /* PartitionPruneInfos added in this query's plan. */ + List *partPruneInfos; }; diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 61cae463fb3..2e202892a71 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -70,6 +70,9 @@ typedef struct PlannedStmt struct Plan *planTree; /* tree of Plan nodes */ + List *partPruneInfos; /* List of PartitionPruneInfo contained in + * the plan */ + List *rtable; /* list of RangeTblEntry nodes */ /* rtable indexes of target relations for INSERT/UPDATE/DELETE/MERGE */ @@ -270,8 +273,8 @@ typedef struct Append */ int first_partial_plan; - /* Info for run-time subplan pruning; NULL if we're not doing that */ - struct PartitionPruneInfo *part_prune_info; + /* Index to PlannerInfo.partPruneInfos or -1 if no run-time pruning */ + int part_prune_index; } Append; /* ---------------- @@ -305,8 +308,8 @@ typedef struct MergeAppend /* NULLS FIRST/LAST directions */ bool *nullsFirst pg_node_attr(array_size(numCols)); - /* Info for run-time subplan pruning; NULL if we're not doing that */ - struct PartitionPruneInfo *part_prune_info; + /* Index to PlannerInfo.partPruneInfos or -1 if no run-time pruning */ + int part_prune_index; } MergeAppend; /* ---------------- @@ -1406,6 +1409,8 @@ typedef struct PlanRowMark * Then, since an Append-type node could have multiple partitioning * hierarchies among its children, we have an unordered List of those Lists. * + * root_parent_relids RelOptInfo.relids of the relation to which the parent + * plan node and this PartitionPruneInfo node belong * prune_infos List of Lists containing PartitionedRelPruneInfo nodes, * one sublist per run-time-prunable partition hierarchy * appearing in the parent plan node's subplans. @@ -1418,6 +1423,7 @@ typedef struct PartitionPruneInfo pg_node_attr(no_equal) NodeTag type; + Bitmapset *root_parent_relids; List *prune_infos; Bitmapset *other_subplans; } PartitionPruneInfo; |