8000 Doc: prefer sysctl to /proc/sys in docs and comments. · postgres/postgres@d0371f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit d0371f1

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/361175.1661187463@sss.pgh.pa.us
1 parent 51e9469 commit d0371f1

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
@@ -1317,11 +1317,12 @@ default:\
13171317
<itemizedlist>
13181318
<listitem>
13191319
<para>
1320-
On <productname>Linux</productname>
1321-
<filename>/proc/sys/fs/file-max</filename> determines the
1322-
maximum number of open files that the kernel will support. It can
1323-
be changed by writing a different number into the file or by
1324-
adding an assignment in <filename>/etc/sysctl.conf</filename>.
1320+
On <productname>Linux</productname> the kernel parameter
1321+
<varname>fs.file-max</varname> determines the maximum number of open
1322+
files that the kernel will support. It can be changed with
1323+
<literal>sysctl -w fs.file-max=<replaceable>N</replaceable></literal>.
1324+
To make the setting persist across reboots, add an assignment
1325+
in <filename>/etc/sysctl.conf</filename>.
13251326
The maximum limit of files per process is fixed at the time the
13261327
kernel is compiled; see
13271328
<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
@@ -4832,7 +4832,7 @@ SubPostmasterMain(int argc, char *argv[])
48324832
* If testing EXEC_BACKEND on Linux, you should run this as root before
48334833
* starting the postmaster:
48344834
*
4835-
* echo 0 >/proc/sys/kernel/randomize_va_space
4835+
* sysctl -w kernel.randomize_va_space=0
48364836
*
48374837
* This prevents using randomized stack and code addresses that cause the
48384838
* child process's memory map to be different from the parent's, making it

0 commit comments

Comments
 (0)
0