Re: Fix memory leak in gist_page_items() of pageinspect

Поиск
Список
Период
Сортировка
От Japin Li
Тема Re: Fix memory leak in gist_page_items() of pageinspect
Дата
Msg-id MEAPR01MB3031EC6594C564509A37419EB6A9A@MEAPR01MB3031.ausprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Fix memory leak in gist_page_items() of pageinspect  (Chao Li <li.evan.chao@gmail.com>)
Ответы Re: Fix memory leak in gist_page_items() of pageinspect
Список pgsql-hackers
On Fri, 19 Dec 2025 at 08:23, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:
> Hi,
>
> On Fri, Dec 19, 2025 at 02:21:40PM +0800, Japin Li wrote:
>> On Fri, 19 Dec 2025 at 04:29, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:
>> > Yeah, and removing IS_INDEX() and adding a check for partitioned indexes would
>> > still mean 2 code paths. So, v2 changes the close calls (and that's consistent
>> > with what pgstatginindex_internal() is doing.
>> >
>> 
>> It would be reasonable to add a comment explaining the choice of
>> relation_open()/relation_close() instead of the index-specific
>> index_open()/index_close().
>
> Yeah that would not hurt. What about before the relation_open() calls?
>
> "
> Use relation_open() and not index_open() to avoid the validate_relation_kind()
> check as we handle relation validation separately below.
> "
>

LGTM.

-- 
Regards,
Japin Li
ChengDu WenWu Information Technology Co., Ltd.



В списке pgsql-hackers по дате отправления: