public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Zsolt Parragi <[email protected]>
Cc: Bertrand Drouvot <[email protected]>
Cc: Alexander Kuzmenkov <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Anthonin Bonnefoy <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Fix uninitialized xl_running_xacts padding
Date: Wed, 18 Mar 2026 11:20:23 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAN4CZFN-Ab6J-zLRLiMvrj+ysYPJohwkiGALpcw4CWM_uHVU9g@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CALzhyqzKTRVsQGj+qDDRVs3Oo0EvffuQvVO0v4rbpWU=SoXKug@mail.gmail.com>
	<CALzhyqzLh9iciLMvT9T-Z+o1ekOPpeP2p2r7tYXNZ8JMSea3Zg@mail.gmail.com>
	<[email protected]>
	<CALzhyqy27==NkjnXYysF1zJj_K2rX5kncJZ9fEdTRVszTjJisg@mail.gmail.com>
	<[email protected]>
	<CALzhyqxrc1ZHYmf5V8NE+yMboqVg7xZrQM7K2c7VS0p1v8z42w@mail.gmail.com>
	<[email protected]>
	<CAN4CZFN-Ab6J-zLRLiMvrj+ysYPJohwkiGALpcw4CWM_uHVU9g@mail.gmail.com>

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


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

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], [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