On 2017/09/12 17:53, Ashutosh Bapat wrote: > On Tue, Sep 12, 2017 at 1:42 PM, Amit Langote wrote: >> So, we can remove partitioned_rels from (Merge)AppendPath and >> (Merge)Append nodes and remove ExecLockNonLeafAppendTables(). > > Don't we need partitioned_rels from Append paths to be transferred to > ModifyTable node or we have a different way of calculating > nonleafResultRelations?
No, we don't transfer partitioned_rels from Append path to ModifyTable node. inheritance_planner(), that builds the ModifyTable path for UPDATE/DELETE on a partitioned table, fetches partitioned_rels from root->pcinfo_list itself and passes it to create_modifytable_path. No Append path is involved in that case. PlannedStmt.nonleafResultRelations is built by concatenating the partitioned_rels lists of all ModifyTable nodes appearing in the query. It does not depend on Append's or AppendPath's partitioned_rels. Thanks, Amit -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers