pgsql: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Move SLRU_PAGES_PER_SEGMENT to pg_config_manual.h
Date
Msg-id E1vISiF-005vRP-0P@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Translation updates
Next
From: Jacob Champion
Date:
Subject: pgsql: libpq: Prevent some overflows of int/size_t