public inbox for [email protected]
help / color / mirror / Atom feedFrom: Álvaro Herrera <[email protected]>
To: Andres Freund <[email protected]>
Cc: Pg Hackers <[email protected]>
Subject: Re: some more include removal from headers
Date: Thu, 2 Apr 2026 20:24:29 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <olxypm44m2bqzicr7biie37swt7c5uevpq3sbf7pzcykd2mirw@nw5pydkpjgeg>
On 2026-Apr-02, Andres Freund wrote:
> I got pretty annoyed this cycle with how much rebuilding a simple change to
> bufmgr.h triggers (due to hacking on it a lot). I started to write a series
> to improve that, but didn't get around to posting that yet due to encountering
> the issue 771fe0948ca fixed while improving the situation.
>
> During that I encountered the objectaddress.h include, as part of which I then
> complained about the issue in [1].
Ah yeah, I noticed and was annoyed by that too.
> After the attached patches, a change to bufmgr.h triggers rebuilding 213
> files, before it was 323. Not perfect, but better.
>
> Would be nice to get rid of the bufmgr.h includes in access/nbtree.h and such,
> but it looks like that'd be a bit more work.
>
> I included your catalog/publication.h in it, as my version had surprisingly
> extensive bitrot...
I ran each patch individually under headerscheck and a full tree
compile; they all pass for me. Also, each change is sensible on its own.
Looking at what else includes bufmgr.h, I think the minimum it can
reduced to is compiling 157 files when you change bufmgr.h, per the
patches attached here. Most of them are direct inclusions, so reducing
further is tough. The only one we could blame is xlogutils.h, but it
needs the ReadBufferMode enum, so in order to do better, we'd have to
split bufmgr.h in two.
(A "fun" one is logicalproto.h being included by walreceiver.h, in turn
being included by slot.h, in turn being included by logical.h, in turn
being included by decode.h.)
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
view thread (7+ 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]
Subject: Re: some more include removal from headers
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