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

From Andres Freund
Subject Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h
Date
Msg-id ehlbridkqbyvl6btaq4smmyr6rqfnel6xgd3qcisrwhoarvsp4@4dy5l3ete5be
Whole thread Raw
In response to Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h
List pgsql-hackers
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?


> There was a suggestion earlier to make SLRU_PAGES_PER_SEGMENT a configure
> option [2]. I don't want to go that far; pg_config_manual.h seems like the
> right level of configurability to me.

-1 for both levels of configurability, I think that just makes things more
complicated without any real-world gain.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: MSVC: Improve warning options set
Next
From: Jingtang Zhang
Date:
Subject: Remove redundant initialization of smgr pointer for relcache