Remove useless bms_free() calls in build_child_join_rel().
authorEtsuro Fujita <efujita@postgresql.org>
Fri, 16 Aug 2019 05:35:55 +0000 (14:35 +0900)
committerEtsuro Fujita <efujita@postgresql.org>
Fri, 16 Aug 2019 05:35:55 +0000 (14:35 +0900)
These seem to be leftovers from the original partitionwise-join patch,
perhaps.

Discussion: https://postgr.es/m/CAPmGK145YiMTPRnvev1dLz8na_-0aZ=Xyqn8f2QsJFBUTObNow@mail.gmail.com

src/backend/optimizer/util/relnode.c

index 19e5a449f7577e73507abe33b8a459c87c671983..85415381fb1730995d366693bea42531947c155b 100644 (file)
@@ -858,11 +858,8 @@ build_child_join_rel(PlannerInfo *root, RelOptInfo *outer_rel,
 
        /*
         * Lateral relids referred in child join will be same as that referred in
-        * the parent relation. Throw any partial result computed while building
-        * the targetlist.
+        * the parent relation.
         */
-       bms_free(joinrel->direct_lateral_relids);
-       bms_free(joinrel->lateral_relids);
        joinrel->direct_lateral_relids = (Relids) bms_copy(parent_joinrel->direct_lateral_relids);
        joinrel->lateral_relids = (Relids) bms_copy(parent_joinrel->lateral_relids);