]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Doc: prefer sysctl to /proc/sys in docs and comments.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Aug 2022 13:41:37 +0000 (09:41 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Aug 2022 13:42:10 +0000 (09:42 -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 987330cd07dc94d79cc89ab092a2ecf9ff55c7d6..f34203567079b0b01b11ae7230206c9db1e801c2 100644 (file)
@@ -1275,11 +1275,12 @@ default:\
     <itemizedlist>
      <listitem>
       <para>
-      On <productname>Linux</productname>
-      <filename>/proc/sys/fs/file-max</filename> 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 <filename>/etc/sysctl.conf</filename>.
+      On <productname>Linux</productname> the kernel parameter
+      <varname>fs.file-max</varname> determines the maximum number of open
+      files that the kernel will support.  It can be changed with
+      <literal>sysctl -w fs.file-max=<replaceable>N</replaceable></literal>.
+      To make the setting persist across reboots, add an assignment
+      in <filename>/etc/sysctl.conf</filename>.
       The maximum limit of files per process is fixed at the time the
       kernel is compiled; see
       <filename>/usr/src/linux/Documentation/proc.txt</filename> for
index 1193b8e24b155a2580f96db8e67eeae5d801b471..70c7cc70befea06786999ade08966e1036789bc2 100644 (file)
@@ -4949,7 +4949,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