Re: Fix memory leak in gist_page_items() of pageinspect

Поиск
Список
Период
Сортировка
От Bertrand Drouvot
Тема Re: Fix memory leak in gist_page_items() of pageinspect
Дата
Msg-id aUKamYGiDKO6byp5@ip-10-97-1-34.eu-west-3.compute.internal
обсуждение исходный текст
Ответ на Re: Fix memory leak in gist_page_items() of pageinspect  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Fix memory leak in gist_page_items() of pageinspect
Список pgsql-hackers
Hi,

On Mon, Dec 15, 2025 at 01:08:44PM +0900, Michael Paquier wrote:
> While passing through, I have applied 0001.

Out of curiosity, I searched for other mismatched index_open/relation_close pairs
in the tree and found a few more with the help of [1].

They are fixed in the attached.

Please note that for hash_bitmap_info() and pgstathashindex() the open calls are
changed instead. For those we keep the IS_INDEX() checks to reject partitioned
indexes (which index_open() accepts via validate_relation_kind()). So, that also
changes the error messages in some tests. If we do prefer the previous error
messages we could change the close calls instead (I prefer the way it's done
in the attached though).

Thoughts?

[1]: https://github.com/bdrouvot/coccinelle_on_pg/blob/main/misc/mismatched_open_close_pairs.cocci

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Вложения

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