Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h
Date
Msg-id a4d195d1-b1ea-4c16-ad65-99555e37bb7a@iki.fi
Whole thread Raw
In response to Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 10/11/2025 18:11, Andres Freund wrote:
> Hi,
> 
> On 2025-11-10 13:29:08 +0200, Heikki Linnakangas wrote:
>> At the "make mxidoff 64 bits" thread [1], we're discussing moving
>> SLRU_PAGES_PER_SEGMENT to pg_config_manual.h, to make it accessible from
>> pg_upgrade code. It's currently defined in slru.h, which cannot be included
>> in frontend code. There are many ways we could fix that, but moving
>> SLRU_PAGES_PER_SEGMENT to pg_config_manual.h seems best to me. Patch
>> attached.
> 
> I'm not convinced that pg_config_manual.h is a good place - that suggests it
> makes sense to change the value for some installations, which I don't see any
> reason for. Wouldn't an slrudefs.h or such be more appropriate?

The comment in pg_config_manual.h says about settings defined there:

> In all cases, changing them is only useful in very rare situations
> or for developers.
That seems fitting for SLRU_PAGES_PER_SEGMENT. I don't feel strongly 
either way though, I'm happy to revert and move to slrudefs.h if that's 
the consensus.

I think the control file compatibility check is nice to have in any case 
and we should keep that.

- Heikki




pgsql-hackers by date:

Previous
From: Jingtang Zhang
Date:
Subject: Remove redundant initialization of smgr pointer for relcache
Next
From: Nathan Bossart
Date:
Subject: Re: Improve LWLock tranche name visibility across backends