Re: Fix memory leak in gist_page_items() of pageinspect
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Chao Li <li.evan.chao@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, Heikki Linnakangas <hlinnaka@iki.fi>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-17T11:57:13Z
Lists: pgsql-hackers
Attachments
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