Move MAX_BACKENDS to procnumber.h
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/lmgr/lwlock.c | modified | +1 −1 |
| src/backend/utils/adt/xid8funcs.c | modified | +1 −1 |
| src/backend/utils/init/postinit.c | modified | +1 −0 |
| src/backend/utils/misc/guc_tables.c | modified | +1 −0 |
| src/include/postmaster/postmaster.h | modified | +0 −12 |
| src/include/storage/procnumber.h | modified | +13 −0 |
Discussion
- MAX_BACKENDS size (comment accuracy) 19 messages · 2025-01-25 → 2025-02-24