static ModifyTable *make_modifytable(PlannerInfo *root, Plan *subplan,
                                     CmdType operation, bool canSetTag,
                                     Index nominalRelation, Index rootRelation,
-                                    bool partColsUpdated,
                                     List *resultRelations,
                                     List *updateColnosLists,
                                     List *withCheckOptionLists, List *returningLists,
                            best_path->canSetTag,
                            best_path->nominalRelation,
                            best_path->rootRelation,
-                           best_path->partColsUpdated,
                            best_path->resultRelations,
                            best_path->updateColnosLists,
                            best_path->withCheckOptionLists,
 make_modifytable(PlannerInfo *root, Plan *subplan,
                 CmdType operation, bool canSetTag,
                 Index nominalRelation, Index rootRelation,
-                bool partColsUpdated,
                 List *resultRelations,
                 List *updateColnosLists,
                 List *withCheckOptionLists, List *returningLists,
    node->canSetTag = canSetTag;
    node->nominalRelation = nominalRelation;
    node->rootRelation = rootRelation;
-   node->partColsUpdated = partColsUpdated;
    node->resultRelations = resultRelations;
    if (!onconflict)
    {
 
    else
        root->wt_param_id = -1;
    root->non_recursive_path = NULL;
-   root->partColsUpdated = false;
 
    /*
     * Create the top-level join domain.  This won't have valid contents until
                                        parse->canSetTag,
                                        parse->resultRelation,
                                        rootRelation,
-                                       root->partColsUpdated,
                                        resultRelations,
                                        updateColnosLists,
                                        withCheckOptionLists,
 
    /* A partitioned table should always have a partition descriptor. */
    Assert(partdesc);
 
-   /*
-    * Note down whether any partition key cols are being updated. Though it's
-    * the root partitioned table's updatedCols we are interested in,
-    * parent_updatedCols provided by the caller contains the root partrel's
-    * updatedCols translated to match the attribute ordering of parentrel.
-    */
-   if (!root->partColsUpdated)
-       root->partColsUpdated =
-           has_partition_attrs(parentrel, parent_updatedCols, NULL);
-
    /* Nothing further to do here if there are no partitions. */
    if (partdesc->nparts == 0)
        return;
 
  * 'canSetTag' is true if we set the command tag/es_processed
  * 'nominalRelation' is the parent RT index for use of EXPLAIN
  * 'rootRelation' is the partitioned/inherited table root RTI, or 0 if none
- * 'partColsUpdated' is true if any partitioning columns are being updated,
- *     either from the target relation or a descendent partitioned table.
  * 'resultRelations' is an integer list of actual RT indexes of target rel(s)
  * 'updateColnosLists' is a list of UPDATE target column number lists
  *     (one sublist per rel); or NIL if not an UPDATE
                        Path *subpath,
                        CmdType operation, bool canSetTag,
                        Index nominalRelation, Index rootRelation,
-                       bool partColsUpdated,
                        List *resultRelations,
                        List *updateColnosLists,
                        List *withCheckOptionLists, List *returningLists,
    pathnode->canSetTag = canSetTag;
    pathnode->nominalRelation = nominalRelation;
    pathnode->rootRelation = rootRelation;
-   pathnode->partColsUpdated = partColsUpdated;
    pathnode->resultRelations = resultRelations;
    pathnode->updateColnosLists = updateColnosLists;
    pathnode->withCheckOptionLists = withCheckOptionLists;
 
    bool       *isAltSubplan pg_node_attr(read_write_ignore);
    bool       *isUsedSubplan pg_node_attr(read_write_ignore);
 
-   /* Does this query modify any partition key columns? */
-   bool        partColsUpdated;
-
    /* PartitionPruneInfos added in this query's plan. */
    List       *partPruneInfos;
 
    bool        canSetTag;      /* do we set the command tag/es_processed? */
    Index       nominalRelation;    /* Parent RT index for use of EXPLAIN */
    Index       rootRelation;   /* Root RT index, if partitioned/inherited */
-   bool        partColsUpdated;    /* some part key in hierarchy updated? */
    List       *resultRelations;    /* integer list of RT indexes */
    List       *updateColnosLists;  /* per-target-table update_colnos lists */
    List       *withCheckOptionLists;   /* per-target-table WCO lists */
 
    Index       nominalRelation;
    /* Root RT index, if partitioned/inherited */
    Index       rootRelation;
-   /* some part key in hierarchy updated? */
-   bool        partColsUpdated;
    /* integer list of RT indexes */
    List       *resultRelations;
    /* per-target-table update_colnos lists */
 
                                                Path *subpath,
                                                CmdType operation, bool canSetTag,
                                                Index nominalRelation, Index rootRelation,
-                                               bool partColsUpdated,
                                                List *resultRelations,
                                                List *updateColnosLists,
                                                List *withCheckOptionLists, List *returningLists,