summaryrefslogtreecommitdiff
path: root/src/include/pg_config_manual.h
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2025-11-10 16:11:41 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2025-11-10 16:11:41 +0200
commit3e0ae46d907dd5f36342dd288841f4502bd571f6 (patch)
tree35235b012b704eb18b8f1d4beaddfaab24b28e1d /src/include/pg_config_manual.h
parent3a872ddd64f908ac3dd65c544c2439ecbe737799 (diff)
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
Diffstat (limited to 'src/include/pg_config_manual.h')
-rw-r--r--src/include/pg_config_manual.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index 7e1aa422332..c61a9faf870 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -20,6 +20,16 @@
#define DEFAULT_XLOG_SEG_SIZE (16*1024*1024)
/*
+ * SLRU segment size. A page is the same BLCKSZ as is used everywhere else in
+ * Postgres. The segment size can be chosen somewhat arbitrarily; we make it
+ * 32 pages by default, or 256Kb, i.e. 1M transactions for CLOG or 64K
+ * transactions for SUBTRANS.
+ *
+ * Changing this requires an initdb.
+ */
+#define SLRU_PAGES_PER_SEGMENT 32
+
+/*
* Maximum length for identifiers (e.g. table names, column names,
* function names). Names actually are limited to one fewer byte than this,
* because the length must include a trailing zero byte.