Re: Why our Valgrind reports suck

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Why our Valgrind reports suck
Date: 2025-05-09 16:32:30
Message-ID: 446633.1746808350@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> Briefly looking through the leaks indeed quickly found a real seeming leak,
> albeit of limited size:
> ProcessStartupPacket() does
> buf = palloc(len + 1);
> in TopMemoryContext() without ever freeing it.

Yeah, I saw that too. Didn't seem worth doing anything about it
unless we make pretty massive cleanups elsewhere.

> I have wondered if we ought to have some infrastructure to tear down all
> relcache, catcache entries (and other similar things) before shutdown if
> MEMORY_CONTEXT_CHECKING is enabled. That would make it a lot easier to see
> leaks at shutdown. We certainly have had leaks in relcache etc...

I'd be content if all that stuff was shown as "still reachable".

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2025-05-09 16:36:23 Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Previous Message Bruce Momjian 2025-05-09 16:30:41 Re: PostgreSQL 18 Beta 1 release announcement draft