Re: make MaxBackends available in _PG_init
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, "Bossart,
Nathan" <bossartn@amazon.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, "wangsh.fnst@fujitsu.com" <wangsh.fnst@fujitsu.com>,
Andres Freund <andres@anarazel.de>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Greg Sabino Mullane <htamfids@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-04T20:27:43Z
Lists: pgsql-hackers
On Fri, Feb 4, 2022 at 3:13 PM Nathan Bossart <nathandbossart@gmail.com> wrote: > On Fri, Feb 04, 2022 at 08:46:39AM -0500, Robert Haas wrote: > > For multixact.c, I think you should invent GetMaxOldestSlot() to avoid > > confusion. Maybe it could be a static inline rather than a macro. > > > > Likewise, I think PROCARRAY_MAXPROCS, NumProcSignalSlots, and > > NumBackendStatSlots should be replaced with things that look more like > > function calls. > > Sorry, I did notice that it looked odd, and I should've done this in v8 and > saved a round trip. Here's a new revision with those macros converted to > inline functions. I've also dialed things back a little in some places > where a new variable felt excessive. Great. I'll take a look at this next week, but not right now, mostly because it's Friday afternoon and if I commit it and anything breaks I don't want to end up having to fix it on the weekend if I can avoid it. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Add a new shmem_request_hook hook.
- 4f2400cb3f10 15.0 landed
-
Remove non-functional code for unloading loadable modules.
- ab02d702ef08 15.0 landed
-
Fix misleading comments about background worker registration.
- 701d918a426b 15.0 landed
-
Revert the addition of GetMaxBackends() and related stuff.
- 7fc0e7de9fb8 15.0 landed
-
Fix typo in multixact.c
- 0147fc7c8c92 15.0 landed
-
Reduce more the number of calls to GetMaxBackends()
- 4567596316d1 15.0 landed
-
Remove MaxBackends variable in favor of GetMaxBackends() function.
- aa64f23b0292 15.0 landed
-
Fix comments about bgworker registration before MaxBackends initialization
- 5ecd0183fb6a 15.0 landed
-
Fix bogus assertion in BootstrapModeMain().
- e12694523e7e 15.0 cited
-
Make sure MaxBackends is always set
- dfbba2c86cc8 9.3.0 cited