diff options
author | Andres Freund <andres@anarazel.de> | 2025-02-24 05:39:17 -0500 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2025-02-24 06:23:41 -0500 |
commit | 6394a3a61c0deae34ad9e94505d319cebe9e09a1 (patch) | |
tree | da5a4d71d31eff6d36e3455a05ce2ab7a0c4b9c1 /src/backend | |
parent | 0600d276d485a8222eb6b571b08889c9f539e86f (diff) |
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
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/storage/lmgr/lwlock.c | 2 | ||||
-rw-r--r-- | src/backend/utils/adt/xid8funcs.c | 2 | ||||
-rw-r--r-- | src/backend/utils/init/postinit.c | 1 | ||||
-rw-r--r-- | src/backend/utils/misc/guc_tables.c | 1 |
4 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index 8a7fb6a22c6..79cc48b23c4 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -80,9 +80,9 @@ #include "pg_trace.h" #include "pgstat.h" #include "port/pg_bitutils.h" -#include "postmaster/postmaster.h" #include "storage/proc.h" #include "storage/proclist.h" +#include "storage/procnumber.h" #include "storage/spin.h" #include "utils/memutils.h" diff --git a/src/backend/utils/adt/xid8funcs.c b/src/backend/utils/adt/xid8funcs.c index 20b28b2528c..88d798fbf4b 100644 --- a/src/backend/utils/adt/xid8funcs.c +++ b/src/backend/utils/adt/xid8funcs.c @@ -32,9 +32,9 @@ #include "lib/qunique.h" #include "libpq/pqformat.h" #include "miscadmin.h" -#include "postmaster/postmaster.h" #include "storage/lwlock.h" #include "storage/procarray.h" +#include "storage/procnumber.h" #include "utils/builtins.h" #include "utils/memutils.h" #include "utils/snapmgr.h" diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 01bb6a410cb..318600d6d02 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -49,6 +49,7 @@ #include "storage/lmgr.h" #include "storage/proc.h" #include "storage/procarray.h" +#include "storage/procnumber.h" #include "storage/procsignal.h" #include "storage/sinvaladt.h" #include "storage/smgr.h" diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 3f1c7b1ebf6..690bf96ef03 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -77,6 +77,7 @@ #include "storage/large_object.h" #include "storage/pg_shmem.h" #include "storage/predicate.h" +#include "storage/procnumber.h" #include "storage/standby.h" #include "tcop/backend_startup.h" #include "tcop/tcopprot.h" |