Re: Optimize planner memory consumption for huge arrays

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: Optimize planner memory consumption for huge arrays
Дата
Msg-id CAFiTN-vx+xZvLmeWgypyr=U0amJfSwE1DAQh6Kuhue-eJ0v4=A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Optimize planner memory consumption for huge arrays  ("Lepikhov Andrei" <a.lepikhov@postgrespro.ru>)
Список 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 по дате отправления:

Предыдущее
От: Jim Jones
Дата:
Сообщение: [PATCH] Add inline comments to the pg_hba_file_rules view
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: cataloguing NOT NULL constraints