Re: Fix uninitialized xl_running_xacts padding

From: Alexander Kuzmenkov <akuzmenkov(at)tigerdata(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix uninitialized xl_running_xacts padding
Date: 2026-03-10 21:51:50
Message-ID: b607e42e-34ff-414a-b727-dd5ec70babe3@timescale.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 16/02/2026 21:10, Andres Freund wrote:
> I don't think it makes a whole lot of sense to tackle this specifically for
> xl_running_xacts. Until now we just accepted that WAL insertions can contain
> random padding. If we don't want that, we should go around and make sure that
> there is no padding (or padding is initialized) for *all* WAL records,
> document that as the rule, and remove the relevant valgrind suppressions.

That's not random, that's server memory, right? Probably not another
Heartbleed, but I'd rather initialize a few locals than find out.

Happy to see this being worked on, these uninitialized WAL records are a
major obstacle to enabling MemorySanitizer. I ran into this again today
and this is how I found this thread. Unfortunately the MemorySanitizer
can't even use the same suppressions as Valgrind, because the
suppression architecture is different (can only remove the checks from a
given function, not all stack traces that have this function like
Valgrind does).

Best regards
Alexander Kuzmenkov
TigerData

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-03-10 21:52:38 Re: Improve OAuth discovery logging
Previous Message Peter Geoghegan 2026-03-10 21:03:14 Re: Problems with get_actual_variable_range's VISITED_PAGES_LIMIT