From: Tom Lane Date: Tue, 23 Aug 2022 13:41:37 +0000 (-0400) Subject: Doc: prefer sysctl to /proc/sys in docs and comments. X-Git-Tag: REL_10_23~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0d87e2a92ea37d136b5ce69af2e8cd7c6127a35;p=thirdparty%2Fpostgresql.git Doc: prefer sysctl to /proc/sys in docs and comments. sysctl is more portable than Linux's /proc/sys file tree, and often easier to use too. That's why most of our docs refer to sysctl when talking about how to adjust kernel parameters. Bring the few stragglers into line. Discussion: https://postgr.es/m/361175.1661187463@sss.pgh.pa.us --- diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 66dacaeb422..d0632f2d08a 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1302,11 +1302,12 @@ default:\ - On Linux - /proc/sys/fs/file-max determines the - maximum number of open files that the kernel will support. It can - be changed by writing a different number into the file or by - adding an assignment in /etc/sysctl.conf. + On Linux the kernel parameter + fs.file-max determines the maximum number of open + files that the kernel will support. It can be changed with + sysctl -w fs.file-max=N. + To make the setting persist across reboots, add an assignment + in /etc/sysctl.conf. The maximum limit of files per process is fixed at the time the kernel is compiled; see /usr/src/linux/Documentation/proc.txt for diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 661b2d037f2..ddf553b85b9 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -4876,7 +4876,7 @@ SubPostmasterMain(int argc, char *argv[]) * If testing EXEC_BACKEND on Linux, you should run this as root before * starting the postmaster: * - * echo 0 >/proc/sys/kernel/randomize_va_space + * sysctl -w kernel.randomize_va_space=0 * * This prevents using randomized stack and code addresses that cause the * child process's memory map to be different from the parent's, making it