Doc: prefer sysctl to /proc/sys in docs and comments.
authorTom Lane
Tue, 23 Aug 2022 13:41:37 +0000 (09:41 -0400)
committerTom Lane
Tue, 23 Aug 2022 13:41:53 +0000 (09:41 -0400)
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

doc/src/sgml/runtime.sgml
src/backend/postmaster/postmaster.c

index c27c703aa1c575bcabbe4a295da6e32d6fd0dbf4..b9c4e611aaa3c7110986f7086239fc14e9fc1a1a 100644 (file)
@@ -1277,11 +1277,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
index 73ecf09b5e957333530d69d445c1d95e85a0bdb8..d1e9ad2ec4a67910352bb5cf17dd91d257159475 100644 (file)
@@ -4909,7 +4909,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