Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jelte Fennema <postgres(at)jeltef(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, duspensky(at)ya(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption
Date: 2021-03-16 18:12:26
Message-ID: 20210316181226.hj6jicxtqveokjyv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

(replying here because Jelte's email doesn't yet seem to have gone
through moderation)

On 2021-03-16 13:36:24 -0400, Tom Lane wrote:
> Jelte Fennema <postgres(at)jeltef(dot)nl> writes:
> > I'm pretty sure it was the only cause in this specific case. When running
> > postgres with valgrind this was the only block that was repeatedly being
> > leaked.

I wonder if it'd be worth starting to explicitly annotate all the places
that do allocations and are fine with leaking them. E.g. by introducing
malloc_permanently() or such. Right now it's hard to use valgrind et al
to detect leaks because of all the false positives due to such "ok to
leak" allocations.

I sometimes think that we're not great at spotting leak errors because
we're so used to things getting cleaned up in case of error due to
memory contexts...

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2021-03-16 18:44:55 Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption
Previous Message Tom Lane 2021-03-16 18:03:34 Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption