From 5658860b6177d582d4364b287f91c833ede6aaa8 Mon Sep 17 00:00:00 2001 From: amit Date: Wed, 13 Sep 2017 18:24:55 +0900 Subject: [PATCH v45 4/4] Add only unpruned partitioned child rels to partitioned_rels Planner nodes (Merge)Append, ModifyTable each contain a partitioned_rels list that records the RT indexes of partitioned tables affected by that node. Currently, they record the indexes of *all* partitioned tables in a given partition tree, because the list is constructed during an earlier planning phase when it's not known which of those tables will actually be affected by the plan. Instead, construct such a list just before the Path for such a plan is built, by which time, that should be known. That means we no longer need the PartitionedChildRelInfo node and some relevant code in prepunion.c. --- src/backend/nodes/copyfuncs.c | 18 ------- src/backend/nodes/equalfuncs.c | 13 ----- src/backend/nodes/outfuncs.c | 16 +----- src/backend/optimizer/path/allpaths.c | 99 ++++++++++++++++++++-------------- src/backend/optimizer/plan/planner.c | 99 ++++++++++++---------------------- src/backend/optimizer/prep/prepunion.c | 47 +++------------- src/backend/optimizer/util/relnode.c | 3 ++ src/include/nodes/nodes.h | 1 - src/include/nodes/relation.h | 30 +++-------- src/include/optimizer/planner.h | 5 -- src/tools/pgindent/typedefs.list | 1 - 11 files changed, 111 insertions(+), 221 deletions(-) diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index d0ab4273c8..04a7e1aa62 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -2291,21 +2291,6 @@ _copyAppendRelInfo(const AppendRelInfo *from) } /* - * _copyPartitionedChildRelInfo - */ -static PartitionedChildRelInfo * -_copyPartitionedChildRelInfo(const PartitionedChildRelInfo *from) -{ - PartitionedChildRelInfo *newnode = makeNode(PartitionedChildRelInfo); - - COPY_SCALAR_FIELD(parent_relid); - COPY_NODE_FIELD(child_rels); - COPY_SCALAR_FIELD(part_cols_updated); - - return newnode; -} - -/* * _copyPlaceHolderInfo */ static PlaceHolderInfo * @@ -5079,9 +5064,6 @@ copyObjectImpl(const void *from) case T_AppendRelInfo: retval = _copyAppendRelInfo(from); break; - case T_PartitionedChildRelInfo: - retval = _copyPartitionedChildRelInfo(from); - break; case T_PlaceHolderInfo: retval = _copyPlaceHolderInfo(from); break; diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 765b1be74b..164eff7363 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -904,16 +904,6 @@ _equalAppendRelInfo(const AppendRelInfo *a, const AppendRelInfo *b) } static bool -_equalPartitionedChildRelInfo(const PartitionedChildRelInfo *a, const PartitionedChildRelInfo *b) -{ - COMPARE_SCALAR_FIELD(parent_relid); - COMPARE_NODE_FIELD(child_rels); - COMPARE_SCALAR_FIELD(part_cols_updated); - - return true; -} - -static bool _equalPlaceHolderInfo(const PlaceHolderInfo *a, const PlaceHolderInfo *b) { COMPARE_SCALAR_FIELD(phid); @@ -3187,9 +3177,6 @@ equal(const void *a, const void *b) case T_AppendRelInfo: retval = _equalAppendRelInfo(a, b); break; - case T_PartitionedChildRelInfo: - retval = _equalPartitionedChildRelInfo(a, b); - break; case T_PlaceHolderInfo: retval = _equalPlaceHolderInfo(a, b); break; diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index f61ae03ac5..9ce40ee3b3 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -2230,7 +2230,6 @@ _outPlannerInfo(StringInfo str, const PlannerInfo *node) WRITE_NODE_FIELD(full_join_clauses); WRITE_NODE_FIELD(join_info_list); WRITE_NODE_FIELD(append_rel_list); - WRITE_NODE_FIELD(pcinfo_list); WRITE_NODE_FIELD(rowMarks); WRITE_NODE_FIELD(placeholder_list); WRITE_NODE_FIELD(fkey_list); @@ -2255,6 +2254,7 @@ _outPlannerInfo(StringInfo str, const PlannerInfo *node) WRITE_INT_FIELD(wt_param_id); WRITE_BITMAPSET_FIELD(curOuterRels); WRITE_NODE_FIELD(curOuterParams); + WRITE_BOOL_FIELD(partColsUpdated); } static void @@ -2304,6 +2304,7 @@ _outRelOptInfo(StringInfo str, const RelOptInfo *node) WRITE_NODE_FIELD(joininfo); WRITE_BOOL_FIELD(has_eclass_joins); WRITE_BITMAPSET_FIELD(top_parent_relids); + WRITE_NODE_FIELD(partitioned_child_rels); } static void @@ -2529,16 +2530,6 @@ _outAppendRelInfo(StringInfo str, const AppendRelInfo *node) } static void -_outPartitionedChildRelInfo(StringInfo str, const PartitionedChildRelInfo *node) -{ - WRITE_NODE_TYPE("PARTITIONEDCHILDRELINFO"); - - WRITE_UINT_FIELD(parent_relid); - WRITE_NODE_FIELD(child_rels); - WRITE_BOOL_FIELD(part_cols_updated); -} - -static void _outPlaceHolderInfo(StringInfo str, const PlaceHolderInfo *node) { WRITE_NODE_TYPE("PLACEHOLDERINFO"); @@ -4074,9 +4065,6 @@ outNode(StringInfo str, const void *obj) case T_AppendRelInfo: _outAppendRelInfo(str, obj); break; - case T_PartitionedChildRelInfo: - _outPartitionedChildRelInfo(str, obj); - break; case T_PlaceHolderInfo: _outPlaceHolderInfo(str, obj); break; diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 3fd3cadb01..03b94f6593 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -877,6 +877,17 @@ set_append_rel_size(PlannerInfo *root, RelOptInfo *rel, Assert(IS_SIMPLE_REL(rel)); /* + * Initialize partitioned_child_rels to contain this RT index. + * + * Note that during the set_append_rel_pathlist() phase, we will + * bubble up the indexes of partitioned relations that appear down in + * the tree, so that when we've created Paths for all the children, + * the root partitioned table's list will contain all such indexes. + */ + if (rte->relkind == RELKIND_PARTITIONED_TABLE) + rel->partitioned_child_rels = list_make1_int(rti); + + /* * If the partitioned relation has any baserestrictinfo quals then we * attempt to use these quals to prune away partitions that cannot * possibly contain any tuples matching these quals. In this case we'll @@ -1330,6 +1341,12 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, if (IS_DUMMY_REL(childrel)) continue; + /* Bubble up childrel's partitioned children. */ + if (rel->part_scheme) + rel->partitioned_child_rels = + list_concat(rel->partitioned_child_rels, + list_copy(childrel->partitioned_child_rels)); + /* * Child is live, so add it to the live_childrels list for use below. */ @@ -1340,7 +1357,6 @@ set_append_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, add_paths_to_append_rel(root, rel, live_childrels); } - /* * add_paths_to_append_rel * Generate paths for the given append relation given the set of non-dummy @@ -1367,49 +1383,55 @@ add_paths_to_append_rel(PlannerInfo *root, RelOptInfo *rel, List *all_child_outers = NIL; ListCell *l; List *partitioned_rels = NIL; - RangeTblEntry *rte; bool build_partitioned_rels = false; double partial_rows = -1; - if (IS_SIMPLE_REL(rel)) + /* + * AppendPath generated for partitioned tables must record the RT indexes + * of partitioned tables that are direct or indirect children of this + * Append rel. + * + * AppendPath may be for a sub-query RTE (UNION ALL), in which case, 'rel' + * itself does not represent a partitioned relation, but the child sub- + * queries may contain references to partitioned relations. The loop + * below will look for such children and collect them in a list to be + * passed to the path creation function. (This assumes that we don't need + * to look through multiple levels of subquery RTEs; if we ever do, we + * could consider stuffing the list we generate here into sub-query RTE's + * RelOptInfo, just like we do for partitioned rels, which would be used + * when populating our parent rel with paths. For the present, that + * appears to be unnecessary.) + */ + if (rel->part_scheme != NULL) { - /* - * A root partition will already have a PartitionedChildRelInfo, and a - * non-root partitioned table doesn't need one, because its Append - * paths will get flattened into the parent anyway. For a subquery - * RTE, no PartitionedChildRelInfo exists; we collect all - * partitioned_rels associated with any child. (This assumes that we - * don't need to look through multiple levels of subquery RTEs; if we - * ever do, we could create a PartitionedChildRelInfo with the - * accumulated list of partitioned_rels which would then be found when - * populated our parent rel with paths. For the present, that appears - * to be unnecessary.) - */ - rte = planner_rt_fetch(rel->relid, root); - switch (rte->rtekind) + if (IS_SIMPLE_REL(rel)) + partitioned_rels = rel->partitioned_child_rels; + else if (IS_JOIN_REL(rel)) { - case RTE_RELATION: - if (rte->relkind == RELKIND_PARTITIONED_TABLE) - partitioned_rels = - get_partitioned_child_rels(root, rel->relid, NULL); - break; - case RTE_SUBQUERY: - build_partitioned_rels = true; - break; - default: - elog(ERROR, "unexpected rtekind: %d", (int) rte->rtekind); + int relid = -1; + + /* + * For a partitioned joinrel, concatenate the component rels' + * partitioned_child_rels lists. + */ + while ((relid = bms_next_member(rel->relids, relid)) >= 0) + { + RelOptInfo *component; + + Assert(relid >= 1 && relid < root->simple_rel_array_size); + component = root->simple_rel_array[relid]; + Assert(component->part_scheme != NULL); + Assert(list_length(component->partitioned_child_rels) >= 1); + partitioned_rels = + list_concat(partitioned_rels, + list_copy(component->partitioned_child_rels)); + } } + + Assert(list_length(partitioned_rels) >= 1); } - else if (rel->reloptkind == RELOPT_JOINREL && rel->part_scheme) - { - /* - * Associate PartitionedChildRelInfo of the root partitioned tables - * being joined with the root partitioned join (indicated by - * RELOPT_JOINREL). - */ - partitioned_rels = get_partitioned_child_rels_for_join(root, - rel->relids); - } + else if (rel->rtekind == RTE_SUBQUERY) + build_partitioned_rels = true; /* * For every non-dummy child, remember the cheapest path. Also, identify @@ -1428,9 +1450,8 @@ add_paths_to_append_rel(PlannerInfo *root, RelOptInfo *rel, */ if (build_partitioned_rels) { - List *cprels; + List *cprels = childrel->partitioned_child_rels; - cprels = get_partitioned_child_rels(root, childrel->relid, NULL); partitioned_rels = list_concat(partitioned_rels, list_copy(cprels)); } diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index a19f5d0c02..0fedb84ac9 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -615,7 +615,6 @@ subquery_planner(PlannerGlobal *glob, Query *parse, root->multiexpr_params = NIL; root->eq_classes = NIL; root->append_rel_list = NIL; - root->pcinfo_list = NIL; root->rowMarks = NIL; memset(root->upper_rels, 0, sizeof(root->upper_rels)); memset(root->upper_targets, 0, sizeof(root->upper_targets)); @@ -630,6 +629,7 @@ subquery_planner(PlannerGlobal *glob, Query *parse, else root->wt_param_id = -1; root->non_recursive_path = NULL; + root->partColsUpdated = false; /* * If there is a WITH list, process each WITH query and build an initplan @@ -1172,12 +1172,12 @@ inheritance_planner(PlannerInfo *root) ListCell *lc; Index rti; RangeTblEntry *parent_rte; + Relids partitioned_relids = NULL; List *partitioned_rels = NIL; PlannerInfo *parent_root; Query *parent_parse; Bitmapset *parent_relids = bms_make_singleton(top_parentRTindex); PlannerInfo **parent_roots = NULL; - bool partColsUpdated = false; Assert(parse->commandType != CMD_INSERT); @@ -1249,10 +1249,12 @@ inheritance_planner(PlannerInfo *root) if (parent_rte->relkind == RELKIND_PARTITIONED_TABLE) { nominalRelation = top_parentRTindex; - partitioned_rels = get_partitioned_child_rels(root, top_parentRTindex, - &partColsUpdated); - /* The root partitioned table is included as a child rel */ - Assert(list_length(partitioned_rels) >= 1); + + /* + * Root parent's RT index is always present in the partitioned_rels of + * the ModifyTable node, if one is needed at all. + */ + partitioned_relids = bms_make_singleton(top_parentRTindex); } /* @@ -1484,6 +1486,15 @@ inheritance_planner(PlannerInfo *root) continue; /* + * Add the current parent's RT index to the partitione_rels set if + * we're going to create the ModifyTable path for a partitioned root + * table. + */ + if (partitioned_relids) + partitioned_relids = bms_add_member(partitioned_relids, + appinfo->parent_relid); + + /* * If this is the first non-excluded child, its post-planning rtable * becomes the initial contents of final_rtable; otherwise, append * just its modified subquery RTEs to final_rtable. @@ -1583,6 +1594,21 @@ inheritance_planner(PlannerInfo *root) else rowMarks = root->rowMarks; + if (partitioned_relids) + { + int i; + + i = -1; + while ((i = bms_next_member(partitioned_relids, i)) >= 0) + partitioned_rels = lappend_int(partitioned_rels, i); + + /* + * If we're going to create ModifyTable at all, the list should + * contain at least one member, that is, the root parent's index. + */ + Assert(list_length(partitioned_rels) >= 1); + } + /* Create Path representing a ModifyTable to do the UPDATE/DELETE work */ add_path(final_rel, (Path *) create_modifytable_path(root, final_rel, @@ -1590,7 +1616,7 @@ inheritance_planner(PlannerInfo *root) parse->canSetTag, nominalRelation, partitioned_rels, - partColsUpdated, + root->partColsUpdated, resultRelations, subpaths, subroots, @@ -6117,65 +6143,6 @@ done: } /* - * get_partitioned_child_rels - * Returns a list of the RT indexes of the partitioned child relations - * with rti as the root parent RT index. Also sets - * *part_cols_updated to true if any of the root rte's updated - * columns is used in the partition key either of the relation whose RTI - * is specified or of any child relation. - * - * Note: This function might get called even for range table entries that - * are not partitioned tables; in such a case, it will simply return NIL. - */ -List * -get_partitioned_child_rels(PlannerInfo *root, Index rti, - bool *part_cols_updated) -{ - List *result = NIL; - ListCell *l; - - if (part_cols_updated) - *part_cols_updated = false; - - foreach(l, root->pcinfo_list) - { - PartitionedChildRelInfo *pc = lfirst_node(PartitionedChildRelInfo, l); - - if (pc->parent_relid == rti) - { - result = pc->child_rels; - if (part_cols_updated) - *part_cols_updated = pc->part_cols_updated; - break; - } - } - - return result; -} - -/* - * get_partitioned_child_rels_for_join - * Build and return a list containing the RTI of every partitioned - * relation which is a child of some rel included in the join. - */ -List * -get_partitioned_child_rels_for_join(PlannerInfo *root, Relids join_relids) -{ - List *result = NIL; - ListCell *l; - - foreach(l, root->pcinfo_list) - { - PartitionedChildRelInfo *pc = lfirst(l); - - if (bms_is_member(pc->parent_relid, join_relids)) - result = list_concat(result, list_copy(pc->child_rels)); - } - - return result; -} - -/* * add_paths_to_grouping_rel * * Add non-partial paths to grouping relation. diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 6e510f9d94..058fb24927 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -104,8 +104,7 @@ static void expand_partitioned_rtentry(PlannerInfo *root, RangeTblEntry *parentrte, Index parentRTindex, Relation parentrel, PlanRowMark *top_parentrc, LOCKMODE lockmode, - List **appinfos, List **partitioned_child_rels, - bool *part_cols_updated); + List **appinfos); static void expand_single_inheritance_child(PlannerInfo *root, RangeTblEntry *parentrte, Index parentRTindex, Relation parentrel, @@ -1587,9 +1586,6 @@ expand_inherited_rtentry(PlannerInfo *root, RangeTblEntry *rte, Index rti) /* Scan the inheritance set and expand it */ if (RelationGetPartitionDesc(oldrelation) != NULL) { - List *partitioned_child_rels = NIL; - bool part_cols_updated = false; - Assert(rte->relkind == RELKIND_PARTITIONED_TABLE); /* @@ -1598,28 +1594,7 @@ expand_inherited_rtentry(PlannerInfo *root, RangeTblEntry *rte, Index rti) * extract the partition key columns of all the partitioned tables. */ expand_partitioned_rtentry(root, rte, rti, oldrelation, oldrc, - lockmode, &root->append_rel_list, - &partitioned_child_rels, - &part_cols_updated); - - /* - * We keep a list of objects in root, each of which maps a root - * partitioned parent RT index to the list of RT indexes of descendant - * partitioned child tables. When creating an Append or a ModifyTable - * path for the parent, we copy the child RT index list verbatim to - * the path so that it could be carried over to the executor so that - * the latter could identify the partitioned child tables. - */ - if (rte->inh && partitioned_child_rels != NIL) - { - PartitionedChildRelInfo *pcinfo; - - pcinfo = makeNode(PartitionedChildRelInfo); - pcinfo->parent_relid = rti; - pcinfo->child_rels = partitioned_child_rels; - pcinfo->part_cols_updated = part_cols_updated; - root->pcinfo_list = lappend(root->pcinfo_list, pcinfo); - } + lockmode, &root->append_rel_list); } else { @@ -1694,8 +1669,7 @@ static void expand_partitioned_rtentry(PlannerInfo *root, RangeTblEntry *parentrte, Index parentRTindex, Relation parentrel, PlanRowMark *top_parentrc, LOCKMODE lockmode, - List **appinfos, List **partitioned_child_rels, - bool *part_cols_updated) + List **appinfos) { int i; RangeTblEntry *childrte; @@ -1717,8 +1691,8 @@ expand_partitioned_rtentry(PlannerInfo *root, RangeTblEntry *parentrte, * parentrte already has the root partrel's updatedCols translated to match * the attribute ordering of parentrel. */ - if (!*part_cols_updated) - *part_cols_updated = + if (!root->partColsUpdated) + root->partColsUpdated = has_partition_attrs(parentrel, parentrte->updatedCols, NULL); /* First expand the partitioned table itself. */ @@ -1726,14 +1700,6 @@ expand_partitioned_rtentry(PlannerInfo *root, RangeTblEntry *parentrte, top_parentrc, parentrel, appinfos, &childrte, &childRTindex); - /* - * The partitioned table does not have data for itself but still need to - * be locked. Update given list of partitioned children with RTI of this - * partitioned relation. - */ - *partitioned_child_rels = lappend_int(*partitioned_child_rels, - childRTindex); - for (i = 0; i < partdesc->nparts; i++) { Oid childOID = partdesc->oids[i]; @@ -1760,8 +1726,7 @@ expand_partitioned_rtentry(PlannerInfo *root, RangeTblEntry *parentrte, if (childrel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) expand_partitioned_rtentry(root, childrte, childRTindex, childrel, top_parentrc, lockmode, - appinfos, partitioned_child_rels, - part_cols_updated); + appinfos); /* Close child relation, but keep locks */ heap_close(childrel, NoLock); diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index 7f1428b8d8..5ee67ba121 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -159,6 +159,7 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptInfo *parent) rel->part_rels = NULL; rel->partexprs = NULL; rel->nullable_partexprs = NULL; + rel->partitioned_child_rels = NIL; /* * Pass top parent's relids down the inheritance hierarchy. If the parent @@ -574,6 +575,7 @@ build_join_rel(PlannerInfo *root, joinrel->part_rels = NULL; joinrel->partexprs = NULL; joinrel->nullable_partexprs = NULL; + joinrel->partitioned_child_rels = NIL; /* Compute information relevant to the foreign relations. */ set_foreign_rel_properties(joinrel, outer_rel, inner_rel); @@ -745,6 +747,7 @@ build_child_join_rel(PlannerInfo *root, RelOptInfo *outer_rel, joinrel->part_rels = NULL; joinrel->partexprs = NULL; joinrel->nullable_partexprs = NULL; + joinrel->partitioned_child_rels = NIL; joinrel->top_parent_relids = bms_union(outer_rel->top_parent_relids, inner_rel->top_parent_relids); diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index adb0d3a45f..e6b5770c74 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -264,7 +264,6 @@ typedef enum NodeTag T_PlaceHolderVar, T_SpecialJoinInfo, T_AppendRelInfo, - T_PartitionedChildRelInfo, T_PlaceHolderInfo, T_MinMaxAggInfo, T_PlannerParamItem, diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index ed0a885370..b4219b2d57 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -254,8 +254,6 @@ typedef struct PlannerInfo List *append_rel_list; /* list of AppendRelInfos */ - List *pcinfo_list; /* list of PartitionedChildRelInfos */ - List *rowMarks; /* list of PlanRowMarks */ List *placeholder_list; /* list of PlaceHolderInfos */ @@ -320,6 +318,9 @@ typedef struct PlannerInfo /* optional private data for join_search_hook, e.g., GEQO */ void *join_search_private; + + /* Does this query modify any partition key columns? */ + bool partColsUpdated; } PlannerInfo; @@ -539,6 +540,9 @@ typedef struct PartitionSchemeData *PartitionScheme; * partition_qual - Partition constraint if not the root * part_rels - RelOptInfos for each partition * partexprs, nullable_partexprs - Partition key expressions + * partitioned_child_rels - RT indexes of unpruned partitions of + * relation that are partitioned tables + * themselves * * Note: A base relation always has only one set of partition keys, but a join * relation may have as many sets of partition keys as the number of relations @@ -675,6 +679,7 @@ typedef struct RelOptInfo * stored in the same order of bounds */ List **partexprs; /* Non-nullable partition key expressions. */ List **nullable_partexprs; /* Nullable partition key expressions. */ + List *partitioned_child_rels; /* List of RT indexes. */ } RelOptInfo; /* @@ -2127,27 +2132,6 @@ typedef struct AppendRelInfo } AppendRelInfo; /* - * For a partitioned table, this maps its RT index to the list of RT indexes - * of the partitioned child tables in the partition tree. We need to - * separately store this information, because we do not create AppendRelInfos - * for the partitioned child tables of a parent table, since AppendRelInfos - * contain information that is unnecessary for the partitioned child tables. - * The child_rels list must contain at least one element, because the parent - * partitioned table is itself counted as a child. - * - * These structs are kept in the PlannerInfo node's pcinfo_list. - */ -typedef struct PartitionedChildRelInfo -{ - NodeTag type; - - Index parent_relid; - List *child_rels; - bool part_cols_updated; /* is the partition key of any of - * the partitioned tables updated? */ -} PartitionedChildRelInfo; - -/* * For each distinct placeholder expression generated during planning, we * store a PlaceHolderInfo node in the PlannerInfo node's placeholder_list. * This stores info that is needed centrally rather than in each copy of the diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h index 0d8b88d78b..e376a81359 100644 --- a/src/include/optimizer/planner.h +++ b/src/include/optimizer/planner.h @@ -58,9 +58,4 @@ extern Expr *preprocess_phv_expression(PlannerInfo *root, Expr *expr); extern bool plan_cluster_use_sort(Oid tableOid, Oid indexOid); extern int plan_create_index_workers(Oid tableOid, Oid indexOid); -extern List *get_partitioned_child_rels(PlannerInfo *root, Index rti, - bool *part_cols_updated); -extern List *get_partitioned_child_rels_for_join(PlannerInfo *root, - Relids join_relids); - #endif /* PLANNER_H */ diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index 5006babc6c..d9dd2209dc 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -1608,7 +1608,6 @@ PartitionRangeDatumKind PartitionScheme PartitionSpec PartitionTupleRouting -PartitionedChildRelInfo PartitionwiseAggregateType PasswordType Path -- 2.11.0