Re: Optimize planner memory consumption for huge arrays - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Optimize planner memory consumption for huge arrays
Date
Msg-id CAFiTN-vx+xZvLmeWgypyr=U0amJfSwE1DAQh6Kuhue-eJ0v4=A@mail.gmail.com
Whole thread Raw
In response to Re: Optimize planner memory consumption for huge arrays  ("Lepikhov Andrei" <a.lepikhov@postgrespro.ru>)
List pgsql-hackers
On Mon, Sep 4, 2023 at 3:49 PM Lepikhov Andrei
<a.lepikhov@postgrespro.ru> wrote:
>
> > + Const *c = makeConst(nominal_element_type,
> > + -1,
> > + nominal_element_collation,
> > + elmlen,
> > + elem_values[i],
> > + elem_nulls[i],
> > + elmbyval);
> > +
> > + args = list_make2(leftop, c);
> >   if (is_join_clause)
> >   s2 = DatumGetFloat8(FunctionCall5Coll(&oprselproc,
> >     clause->inputcollid,
> > @@ -1984,7 +1985,8 @@ scalararraysel(PlannerInfo *root,
> >     ObjectIdGetDatum(operator),
> >     PointerGetDatum(args),
> >     Int32GetDatum(varRelid)));
> > -
> > + list_free(args);
> > + pfree(c);
> >
> > Maybe you can just use list_free_deep, instead of storing the constant
> > in a separate variable.
> As I see, the first element in the array is leftop, which is used on other iterations. So, we can't use
list_free_deephere. 

Yeah you are right, thanks.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Jim Jones
Date:
Subject: [PATCH] Add inline comments to the pg_hba_file_rules view
Next
From: Alvaro Herrera
Date:
Subject: Re: cataloguing NOT NULL constraints