Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0d87e2

Browse files
committed
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/[email protected]
1 parent 6b50433 commit a0d87e2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,11 +1302,12 @@ default:\
13021302
<itemizedlist>
13031303
<listitem>
13041304
<para>
1305-
On <productname>Linux</productname>
1306-
<filename>/proc/sys/fs/file-max</filename> determines the
1307-
maximum number of open files that the kernel will support. It can
1308-
be changed by writing a different number into the file or by
1309-
adding an assignment in <filename>/etc/sysctl.conf</filename>.
1305+
On <productname>Linux</productname> the kernel parameter
1306+
<varname>fs.file-max</varname> determines the maximum number of open
1307+
files that the kernel will support. It can be changed with
1308+
<literal>sysctl -w fs.file-max=<replaceable>N</replaceable></literal>.
1309+
To make the setting persist across reboots, add an assignment
1310+
in <filename>/etc/sysctl.conf</filename>.
13101311
The maximum limit of files per process is fixed at the time the
13111312
kernel is compiled; see
13121313
<filename>/usr/src/linux/Documentation/proc.txt</filename> for

src/backend/postmaster/postmaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4876,7 +4876,7 @@ SubPostmasterMain(int argc, char *argv[])
48764876
* If testing EXEC_BACKEND on Linux, you should run this as root before
48774877
* starting the postmaster:
48784878
*
4879-
* echo 0 >/proc/sys/kernel/randomize_va_space
4879+
* sysctl -w kernel.randomize_va_space=0
48804880
*
48814881
* This prevents using randomized stack and code addresses that cause the
48824882
* child process's memory map to be different from the parent's, making it

0 commit comments

Comments
 (0)