public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: Alexander Kuzmenkov <[email protected]>
To: Andres Freund <[email protected]>
To: Anthonin Bonnefoy <[email protected]>
Cc: Bertrand Drouvot <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Fix uninitialized xl_running_xacts padding
Date: Wed, 11 Mar 2026 00:09:14 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAO6_Xqoxp7C+y0L==xZXH5V=9PjpBx4T9vJYs87EbxFp_9nwOA@mail.gmail.com>
	<CA+hUKG++LE6P6g4n+-QPHBwAnvcVRyG1tUnzscUriWAFHc6s6Q@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAO6_XqpGYneOe357s4QhOTYpU6UEgk3JJrBiyeuk-9n=f7p=Vw@mail.gmail.com>
	<aoaj45foewpjtu6r5cs67yrx4en3pkurs23e4azv6tbikpw6c3@h3pnaqaksoeg>
	<[email protected]>

On 10/03/2026 23:51, Alexander Kuzmenkov wrote:
> 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).

+1 for initializing all padding in WAL records. In fact I thought that 
we already did that. (Except in this case, apparently)

- Heikki






view thread (16+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Fix uninitialized xl_running_xacts padding
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox