avamingli commented on code in PR #990:
URL: https://github.com/apache/cloudberry/pull/990#discussion_r1997965864


##########
src/backend/executor/nodeModifyTable.c:
##########
@@ -3654,6 +3709,70 @@ ExecEndModifyTable(ModifyTableState *node)
         * shut down subplan
         */
        ExecEndNode(outerPlanState(node));
+
+       /* Notify modified leaf relids to QD */
+       if (GP_ROLE_EXECUTE == Gp_role && node->has_leaf_changed)
+               notify_modified_relations_to_QD(node);
+}
+
+/*
+ * notify_modified_relations_local
+ * For SINGLENODE or we are entry db, update the modified relids on local.
+ * To keep consistent, we set the extend protocol data which will be processed
+ * uniformly later at the end of exetuor run.
+ */
+static void
+notify_modified_relations_local(ModifyTableState *node)
+{
+       Assert(epd);

Review Comment:
   When consume subtag list, it's already been cleaned up
   ```c
   bms_free(list_nth(epd->subtagdata, subtag)); /* clean up */
   ```
   And the list pointer which is tiny will be freed with MemoryContext.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to