Re: Fix memory leak in gist_page_items() of pageinspect

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix memory leak in gist_page_items() of pageinspect
Date: 2025-12-12 10:29:27
Message-ID: 9A53692D-2C50-43C5-8F4E-A9F1EFF0A267@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 12 Dec 2025, at 11:27, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:

> If we're going to bother changing this at all, let's consider reusing the buffer. So instead of initStringInfo()+pfree on every tuple, allocate it once and use resetStringInfo().

+1

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anthonin Bonnefoy 2025-12-12 10:39:50 Propagate XLogFindNextRecord error to callers
Previous Message Heikki Linnakangas 2025-12-12 10:27:52 Re: Fix memory leak in gist_page_items() of pageinspect