postgresql/src
Robert Haas aa64f23b02 Remove MaxBackends variable in favor of GetMaxBackends() function.
Previously, it was really easy to write code that accessed MaxBackends
before we'd actually initialized it, especially when coding up an
extension. To make this less error-prune, introduce a new function
GetMaxBackends() which should be used to obtain the correct value.
This will ERROR if called too early. Demote the global variable to
a file-level static, so that nobody can peak at it directly.

Nathan Bossart. Idea by Andres Freund. Review by Greg Sabino Mullane,
by Michael Paquier (who had doubts about the approach), and by me.

Discussion: http://postgr.es/m/20210802224204.bckcikl45uezv5e4@alap3.anarazel.de
2022-02-08 15:53:19 -05:00
..
backend Remove MaxBackends variable in favor of GetMaxBackends() function. 2022-02-08 15:53:19 -05:00
bin Add (void) cast in front of rmtree() call at the end of pg_upgrade 2022-02-07 14:19:52 +09:00
common Improve code clarity in epilogue of UTF-8 verification fast path 2022-01-17 22:53:50 -05:00
fe_utils Avoid calling gettext() in signal handlers. 2022-01-17 13:30:04 -05:00
include Remove MaxBackends variable in favor of GetMaxBackends() function. 2022-02-08 15:53:19 -05:00
interfaces Fix race condition in gettext() initialization in libpq and ecpglib. 2022-01-21 15:36:27 -05:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl plperl: windows: Use Perl_setlocale on 5.28+, fixing compile failure. 2022-01-30 16:42:14 -08:00
port Simplify coding around path_contains_parent_reference(). 2022-01-31 13:53:38 -05:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Rename create_function_N test scripts for clarity. 2022-02-08 15:40:08 -05:00
timezone Update copyright for 2022 2022-01-07 19:04:57 -05:00
tools Reduce non-leaf keys overlap in GiST indexes produced by a sorted build 2022-02-07 23:20:42 +03:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Add support for LZ4 compression in pg_receivewal 2021-11-05 11:33:25 +09:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00