> On 12 Dec 2025, at 11:27, Heikki Linnakangas 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
On 12/12/2025 11:48, Michael Paquier wrote:
On Fri, Dec 12, 2025 at 09:00:08AM +, Bertrand Drouvot wrote:
On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote:
where CStringGetTextDatum() has made a copy of buf.data and assigned to
value[4], however buf.data is never free-ed.
I did not
Hi,
On Fri, Dec 12, 2025 at 06:48:09PM +0900, Michael Paquier wrote:
> On Fri, Dec 12, 2025 at 09:00:08AM +, Bertrand Drouvot wrote:
> > On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote:
> >> where CStringGetTextDatum() has made a copy of buf.data and assigned to
> >> value[4], however
On Fri, Dec 12, 2025 at 09:00:08AM +, Bertrand Drouvot wrote:
> On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote:
>> where CStringGetTextDatum() has made a copy of buf.data and assigned to
>> value[4], however buf.data is never free-ed.
>
> I did not look in details but I think that we
Hi,
On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote:
> Hi Hackers,
>
> While reading the code of pageinspect, I just found a memory leak
> in gist_page_items():
>
> ```
>values[4] = CStringGetTextDatum(buf.data);
>nulls[4] = false;
> ```
>
> where CStringGetTextDatum() has made
Hi Hackers,
While reading the code of pageinspect, I just found a memory leak
in gist_page_items():
```
values[4] = CStringGetTextDatum(buf.data);
nulls[4] = false;
```
where CStringGetTextDatum() has made a copy of buf.data and assigned to
value[4], however buf.data is never free-ed. This