| From: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> | 
|---|---|
| To: | Amit Langote <amitlangote09(at)gmail(dot)com> | 
| Cc: | Richard Guo <guofenglinux(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Memory consumed by child SpecialJoinInfo in partitionwise join planning | 
| Date: | 2023-10-30 15:20:06 | 
| Message-ID: | CAExHW5uJ-kTEMO1g2QT1XfnLukCrc1niY4FRFzyUOPud8geYhg@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Rebased patchset. No changes in actual patches. 0001 is squashed
version of patches submitted at
https://www.postgresql.org/message-id/CAExHW5sCJX7696sF-OnugAiaXS=Ag95=-m1cSrjcmyYj8Pduuw@mail.gmail.com.
On Tue, Oct 3, 2023 at 6:42 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
> On Fri, Sep 29, 2023 at 8:36 AM Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> > IOW, something
> > like the following would have sufficed:
> >
> > @@ -1735,6 +1735,10 @@ build_child_join_sjinfo(PlannerInfo *root,
> > SpecialJoinInfo *parent_sjinfo,
> >  /*
> >   * free_child_sjinfo_members
> >   *     Free memory consumed by members of a child SpecialJoinInfo.
> > + *
> > + * Only members that are translated copies of their counterpart in the parent
> > + * SpecialJoinInfo are freed here.  However, members that could be referenced
> > + * elsewhere are not freed.
> >   */
> >  static void
> >  free_child_sjinfo_members(SpecialJoinInfo *child_sjinfo)
> > @@ -1755,10 +1759,7 @@ free_child_sjinfo_members(SpecialJoinInfo *child_sjinfo)
> >     bms_free(child_sjinfo->syn_lefthand);
> >     bms_free(child_sjinfo->syn_righthand);
> >
> > -   /*
> > -    * But the list of operator OIDs and the list of expressions may be
> > -    * referenced somewhere else. Do not free those.
> > -    */
> > +   /* semi_rhs_exprs may be referenced, so don't free. */
> >  }
>
> Works for me. PFA patchset with these changes. I have still left the
> changes addressing your comments as a separate patch for easier
> review.
>
> --
> Best Wishes,
> Ashutosh Bapat
-- 
Best Wishes,
Ashutosh Bapat
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Kukushkin | 2023-10-30 15:26:39 | Re: pg_rewind WAL segments deletion pitfall | 
| Previous Message | Xing Guo | 2023-10-30 14:58:49 | Remove obsolete check for TTSOpsVirtual from slot_compile_deform |