Re: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Maxim Orlov <orlovmg@gmail.com>, Daniil Davydov <3danissimo@gmail.com>
Date: 2025-11-10T12:22:06Z
Lists: pgsql-hackers
> On 10 Nov 2025, at 13:18, Heikki Linnakangas <hlinnaka@iki.fi> wrote:

> Hmm, there's not much space for further explanations on that line. We could add a longer multi-line comment but I'd rather keep it short and consistent with the other similar fields around it. I hope that readers who want more information will find the SLRU_PAGES_PER_SEGMENT definition and the comments there.

Fair enough.

> I did consider renaming the field to 'slru_seg_size', to rhyme with 'relseg_size' and 'xlog_seg_size'. But then it wouldn't match the name of SLRU_PAGES_PER_SEGMENT anymore. We could rename SLRU_PAGES_PER_SEGMENT too, but I'm not sure it's worth the code churn, and IMO "pages per segment" is better than "segment size" anyway because it tells you what the unit is.

Agreed, renaming would be a net negative overall I think.

--
Daniel Gustafsson




Commits

  1. Add warning to pg_controldata on PG_CONTROL_VERSION mismatch

  2. Add pg_resetwal and pg_controldata support for new control file field

  3. Bump PG_CONTROL_VERSION for commit 3e0ae46d90

  4. Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h