pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h
Date: Mon, 10 Nov 2025 14:17:43 +0000
Message-ID: <E1vISiF-005vRP-0P@gemulon.postgresql.org> (raw)

Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h

It seems plausible that someone might want to experiment with
different values. The pressing reason though is that I'm reviewing a
patch that requires pg_upgrade to manipulate SLRU files. That patch
needs to access SLRU_PAGES_PER_SEGMENT from pg_upgrade code, and
slru.h, where SLRU_PAGES_PER_SEGMENT is currently defined, cannot be
included from frontend code. Moving it to pg_config_manual.h makes it
accessible.

Now that it's a little more likely that someone might change
SLRU_PAGES_PER_SEGMENT, add a cluster compatibility check for it.

Bump catalog version because of the new field in the control file.

Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://www.postgresql.org/message-id/c7a4ea90-9f7b-4953-81be-b3fcb47db057@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e0ae46d907dd5f36342dd288841f4502bd571f6

Modified Files
--------------
src/backend/access/transam/xlog.c | 11 +++++++++++
src/include/access/slru.h         | 15 ---------------
src/include/catalog/catversion.h  |  2 +-
src/include/catalog/pg_control.h  |  2 ++
src/include/pg_config_manual.h    | 10 ++++++++++
5 files changed, 24 insertions(+), 16 deletions(-)



Message-ID: <E1vISiF-005vRP-0P@gemulon.postgresql.org>
Permalink:  ../E1vISiF-005vRP-0P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vISiF-005vRP-0P@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h
  In-Reply-To: <E1vISiF-005vRP-0P@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox