Re: list_free in addRangeTableEntryForJoin

Поиск
Список
Период
Сортировка
Искать
От
Ranier Vilela
Тема
Re: list_free in addRangeTableEntryForJoin
Дата
Msg-id
CAEudQApdbWD2vwXG1hZUwGbOd6TLp3eHi48LRYhjsE6Fzv0Tnw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
list_free in addRangeTableEntryForJoin Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Re: list_free in addRangeTableEntryForJoin Tom Lane <tgl@sss.pgh.pa.us>
Re: list_free in addRangeTableEntryForJoin Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Re: list_free in addRangeTableEntryForJoin Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Re: list_free in addRangeTableEntryForJoin Ranier Vilela <ranier.vf@gmail.com>
Re: list_free in addRangeTableEntryForJoin Ranier Vilela <ranier.vf@gmail.com>
Re: list_free in addRangeTableEntryForJoin Ranier Vilela <ranier.vf@gmail.com>
Em seg., 10 de jun. de 2024 às 09:11, Ilia Evdokimov <ilya.evdokimov@tantorlabs.com> escreveu:
 >But callers of addRangeTableEntryForJoin(), expects to handle a list
or NIL, if we free the memory
I've thoroughly reviewed all callers of the
`addRangeTableEntryForJoin()` function and confirmed that the list is
not used after this function is called. Since
`addRangeTableEntryForJoin()` is the last function to use this list, it
would be more efficient to free the `List` at the point of its declaration.

I'll attach new patch where I free the lists.
Seems like a better style.

Now you need to analyze whether the memory in question is not managed by a Context and released in a block, 
which would make this release useless.

best regards,
Ranier Vilela
В списке pgsql-hackers по дате отправления
От: Ilia Evdokimov
Дата:
От: James Coleman
Дата:
FAQ