From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Lepikhov Andrei <a(dot)lepikhov(at)postgrespro(dot)ru> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Евгений Бредня <e(dot)brednya(at)postgrespro(dot)ru> |
Subject: | Re: Optimize planner memory consumption for huge arrays |
Date: | 2023-09-04 10:59:01 |
Message-ID: | CAFiTN-vx+xZvLmeWgypyr=U0amJfSwE1DAQh6Kuhue-eJ0v4=A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Sep 4, 2023 at 3:49 PM Lepikhov Andrei
<a(dot)lepikhov(at)postgrespro(dot)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_deep here.
Yeah you are right, thanks.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2023-09-04 11:00:05 | Re: cataloguing NOT NULL constraints |
Previous Message | Jim Jones | 2023-09-04 10:54:15 | [PATCH] Add inline comments to the pg_hba_file_rules view |