Re: [PATCH] Fix missing pfree(flags.data) in overexplain_debug

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Lakshmi N <lakshmin(dot)jhs(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Fix missing pfree(flags.data) in overexplain_debug
Date: 2026-04-14 09:20:15
Message-ID: 891df2c6-9f41-4b5e-80c7-fe489decf1ad@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-04-14 09:22:27 Re: Reduce build times of pg_trgm GIN indexes
Previous Message Andrey Borodin 2026-04-14 09:11:33 Re: Compress prune/freeze records with Delta Frame of Reference algorithm