Re: Fix uninitialized xl_running_xacts padding - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Fix uninitialized xl_running_xacts padding
Date
Msg-id aboL57TwiaOBTyXJ@paquier.xyz
Whole thread Raw
In response to Re: Fix uninitialized xl_running_xacts padding  (Zsolt Parragi <zsolt.parragi@percona.com>)
List pgsql-hackers
On Tue, Mar 17, 2026 at 06:45:46PM +0000, Zsolt Parragi wrote:
> What do you think? I'm interested in opinions about both the specific
> case, and the generic idea of using custom clang-tidy checks for
> various postgres-specific checks. As I mentioned at the beginning of
> the message I think this could be useful for other things and doesn't
> always require custom annotations, in several cases it could work
> without any C code change.

That's an interesting idea to be more aggressive in terms of the
checks done, but the invasiveness and the footprint this involves in
the WAL insertion code paths makes it a no-go for me.

Valgrind has proved to be quite useful over the years.  Sure, it takes
more time to run it, but for this specific issue I don't see why we
should not continue relying on it, not reinventing the wheel, and it's
served us pretty well.  While removing padding is a nice practice on
clean ground to make WAL records reproducible, that would mean forcing
the rule even for custom WAL RMGRs.  Some could say that they're OK to
live with some padding, and that we don't have to be strictly
aggressive at the code level.

Different opinions are of course welcome, that's just my feeling on
the matter about your proposal.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: DOCS: typo on CLUSTER page
Next
From: KAZAR Ayoub
Date:
Subject: Re: Speed up COPY TO text/CSV parsing using SIMD