Re: [PATCH] Fix missing pfree(flags.data) in overexplain_debug - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [PATCH] Fix missing pfree(flags.data) in overexplain_debug
Date
Msg-id 891df2c6-9f41-4b5e-80c7-fe489decf1ad@iki.fi
Whole thread Raw
In response to [PATCH] Fix missing pfree(flags.data) in overexplain_debug  (Lakshmi N <lakshmin.jhs@gmail.com>)
List pgsql-hackers
On 13/04/2026 23:33, Lakshmi N wrote:
> Hi hackers,
> 
> attached a small patch to fix missing  pfree(flags.data) in 
> overexplain_debug.

These leaks are to a relatively short-lived memory context. We don't 
need to meticulously pfree() those, they will go away with the memory 
context. There are also numerous psprintf() calls in the function and in 
the subroutines which are not pfreed, for example.

We're not totally consistent, as there are pfree() calls in some of the 
subroutines. I don't know if there's some grand plan on when to pfree() 
and when not to bother, but this one pfree() won't move the needle much 
in any case.

- Heikki




pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: Compress prune/freeze records with Delta Frame of Reference algorithm
Next
From: Heikki Linnakangas
Date:
Subject: Re: Reduce build times of pg_trgm GIN indexes