postgresql/src/backend/bootstrap
Tom Lane 21fb39cb07 Set max_safe_fds whenever we create shared memory and semaphores.
Formerly we skipped this in bootstrap/check mode and in single-user
mode.  That's bad in check mode because it may allow accepting a
value of max_connections that doesn't actually work: on platforms
where semaphores consume file descriptors, there may not be enough
free FDs left over to satisfy fd.c, causing postmaster start to
fail.  It's also not great in single-user mode, because fd.c will
operate with just the minimum allowable value of max_safe_fds,
resulting in excess file open/close overhead if anything moderately
complicated is done in single-user mode.  (There may be some penalty
for bootstrap mode too, though probably not much.)

Discussion: https://postgr.es/m/2081982.1734393311@sss.pgh.pa.us
2024-12-17 12:23:26 -05:00
..
.gitignore Build all Flex files standalone 2022-09-04 12:09:01 +07:00
bootparse.y Include bison header files into implementation files 2024-08-02 10:25:11 +02:00
bootscanner.l Update copyright for 2024 2024-01-03 20:49:05 -05:00
bootstrap.c Set max_safe_fds whenever we create shared memory and semaphores. 2024-12-17 12:23:26 -05:00
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00