From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move MAX_BACKENDS to procnumber.h
Date: Mon, 24 Feb 2025 11:40:39 +0000
Message-ID: <E1tmWpC-000Rm2-2h@gemulon.postgresql.org> (raw)
Move MAX_BACKENDS to procnumber.h
MAX_BACKENDS influences many things besides postmaster. I e.g. noticed that we
don't have static assertions ensuring BUF_REFCOUNT_MASK is big enough for
MAX_BACKENDS, adding them would require including postmaster.h in
buf_internals.h which doesn't seem right.
While at that, add MAX_BACKENDS_BITS, as that's useful in various places for
static assertions (to be added in subsequent commits).
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/wptizm4qt6yikgm2pt52xzyv6ycmqiutloyvypvmagn7xvqkce@d4xuv3mylpg4
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6394a3a61c0deae34ad9e94505d319cebe9e09a1
Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 2 +-
src/backend/utils/adt/xid8funcs.c | 2 +-
src/backend/utils/init/postinit.c | 1 +
src/backend/utils/misc/guc_tables.c | 1 +
src/include/postmaster/postmaster.h | 12 ------------
src/include/storage/procnumber.h | 13 +++++++++++++
6 files changed, 17 insertions(+), 14 deletions(-)
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: andres@anarazel.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Move MAX_BACKENDS to procnumber.h
In-Reply-To: <E1tmWpC-000Rm2-2h@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