Re: make MaxBackends available in _PG_init
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Sabino Mullane <htamfids@gmail.com>
Cc: "Bossart, Nathan" <bossartn@amazon.com>,
Robert Haas <robertmhaas@gmail.com>,
Andres Freund <andres@anarazel.de>,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
"pgsql-hackers@lists.postgresql.org"
<pgsql-hackers@lists.postgresql.org>
Date: 2021-08-11T14:08:01Z
Lists: pgsql-hackers
Greg Sabino Mullane <htamfids@gmail.com> writes: > v3 looks good, but I'm still not sure how to test the bit mentioned above. > I'm not familiar with this part of the code (SubPostmasterMain etc.), but > running make check-world with EXEC_BACKEND does not seem to execute that > code, as I added exit(1) to restore_backend_variables() and the tests still > ran fine. You must not have enabled EXEC_BACKEND properly. It's a compile-time #define that affects multiple modules, so it's easy to get wrong. The way I usually turn it on is make distclean ./configure ... options of choice ... edit src/include/pg_config.h, add "#define EXEC_BACKEND" line make, install, test In this way the setting is persistent till the next distclean/configure cycle. regards, tom lane
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