Re: Fix memory leak in gist_page_items() of pageinspect

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix memory leak in gist_page_items() of pageinspect
Date: 2026-01-06 07:29:16
Message-ID: aVy5zEAG8memlM_0@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 22, 2025 at 10:41:44AM +0800, Chao Li wrote:
> On Dec 19, 2025, at 18:26, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>> Thanks! Done that way in the attached.
>
> LGTM. As the immediately following statement is if (!IS_INDEX(rel)),
> adding a comment to relation_open() feels very necessary.

The fact that partitioned indexes are not allowed in these functions
is not a fact that stands out, and one would be indeed tempted to make
the switch. The tests would complain on relation open, though.
Reworded the comment a bit and applied the result.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2026-01-06 07:30:34 Re: Making jsonb_agg() faster
Previous Message Xuneng Zhou 2026-01-06 07:29:06 Re: Implement waiting for wal lsn replay: reloaded