Re: Why our Valgrind reports suck

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: "David E. Wheeler" <david@justatheory.com>, Alexander Lakhin <exclusion@gmail.com>, Richard Guo <guofenglinux@gmail.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org
Date: 2026-06-12T13:50:01Z
Lists: pgsql-hackers
=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.de> writes:
> On 2026-Jun-12, David E. Wheeler wrote:
>> On Jun 10, 2026, at 22:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> or, actually, the bug's not so old: apparently I broke it in
>>> e78d1d6d4.  Where's my brown paper bag?

>> Oh man, now I want to know what this references!

> Is this what you mean?
> https://hackersdictionary.com/html/entry/brown-paper-bag-bug.html

Yeah, pretty much, though Linus didn't get the phrase out of nowhere.
When I use it I tend to think of sports fans whose chosen team is so
bad that they feel a need to wear a bag over their heads when
attending games.  Handy example here:

https://www.reddit.com/r/Browns/comments/1g7y29b/going_to_the_game_today_bringing_a_blank_brown/

			regards, tom lane



Commits

  1. Undo thinko in commit e78d1d6d4.

  2. Avoid leakage of zero-length arrays in partition_bounds_copy().

  3. Fix MemoryContextAllocAligned's interaction with Valgrind.

  4. Fix assorted pretty-trivial memory leaks in the backend.

  5. Improve our support for Valgrind's leak tracking.

  6. Reduce leakage during PL/pgSQL function compilation.

  7. Silence Valgrind leakage complaints in more-or-less-hackish ways.

  8. Silence complaints about leaks in PlanCacheComputeResultDesc.

  9. Suppress complaints about leaks in TS dictionary loading.

  10. Suppress complaints about leaks in function cache loading.

  11. Fix per-relation memory leakage in autovacuum.

  12. Fix AlignedAllocRealloc to cope sanely with OOM.