Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d53ff6a

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 42681df commit d53ff6a

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
@@ -1277,11 +1277,12 @@ default:\
12771277
<itemizedlist>
12781278
<listitem>
12791279
<para>
1280-
On <productname>Linux</productname>
1281-
<filename>/proc/sys/fs/file-max</filename> determines the
1282-
maximum number of open files that the kernel will support. It can
1283-
be changed by writing a different number into the file or by
1284-
adding an assignment in <filename>/etc/sysctl.conf</filename>.
1280+
On <productname>Linux</productname> the kernel parameter
1281+
<varname>fs.file-max</varname> determines the maximum number of open
1282+
files that the kernel will support. It can be changed with
1283+
<literal>sysctl -w fs.file-max=<replaceable>N</replaceable></literal>.
1284+
To make the setting persist across reboots, add an assignment
1285+
in <filename>/etc/sysctl.conf</filename>.
12851286
The maximum limit of files per process is fixed at the time the
12861287
kernel is compiled; see
12871288
<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
@@ -4909,7 +4909,7 @@ SubPostmasterMain(int argc, char *argv[])
49094909
* If testing EXEC_BACKEND on Linux, you should run this as root before
49104910
* starting the postmaster:
49114911
*
4912-
* echo 0 >/proc/sys/kernel/randomize_va_space
4912+
* sysctl -w kernel.randomize_va_space=0
49134913
*
49144914
* This prevents using randomized stack and code addresses that cause the
49154915
* child process's memory map to be different from the parent's, making it

0 commit comments

Comments
 (0)