11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.99 2001/11/28 20:49:10 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.100 2001/12/27 21:37:34 tgl Exp $
33-->
44
55<Chapter Id="runtime">
@@ -57,15 +57,15 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.99 2001/11/28 20:49:10 pet
5757 through a single instance of a running database server. After
5858 initialization, a database cluster will contain one database named
5959 <literal>template1</literal>. As the name suggests, this will be used
60- as a template forany subsequently createddatabase ; it should not be
60+ as a template for subsequently createddatabases ; it should not be
6161 used for actual work.
6262 </para>
6363
6464 <para>
6565 In file system terms, a database cluster will be a single directory
6666 under which all data will be stored. We call this the <firstterm>data
6767 directory</firstterm> or <firstterm>data area</firstterm>. It is
68- completely up to you where you choose to store your data, there is no
68+ completely up to you where you choose to store your data. There is no
6969 default, although locations such as
7070 <filename>/usr/local/pgsql/data</filename> or
7171 <filename>/var/lib/pgsql/data</filename> are popular. To initialize a
@@ -76,7 +76,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.99 2001/11/28 20:49:10 pet
7676<screen>
7777<prompt>$</> <userinput>initdb -D /usr/local/pgsql/data</userinput>
7878</screen>
79- Note that you must execute this command while being loggedin to
79+ Note that you must execute this command while being loggedinto
8080 the <productname>PostgreSQL</productname> user account, which is described in the previous
8181 section.
8282 </para>
@@ -113,22 +113,25 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
113113
114114 <para>
115115 Because the data directory contains all the data stored in the
116- database it is essential that it be well secured from unauthorized
116+ database, it is essential that it be well secured from unauthorized
117117 access. <command>initdb</command> therefore revokes access
118118 permissions from everyone but the <productname>PostgreSQL</productname> user account.
119119 </para>
120120
121121 <para>
122122 However, while the directory contents are secure, the default
123- <filename>pg_hba.conf</filename> authentication of
124- <literal>trust</literal> allows any local user tobecome the
125- superuser andconnect to the database. If you don't trustyour local
126- users, we recommend you usethe <command>initdb</command> option
123+ <filename>pg_hba.conf</filename> authenticationmethod of
124+ <literal>trust</literal> allows any local user toconnect to the database
125+ andeven become the database superuser . If you don't trustother local
126+ users, we recommend you use <command>initdb</command>'s option
127127 <option>-W</option> or <option>--pwprompt</option> to assign a
128- password to the superuser and modify your
129- <filename>pg_hba.conf</filename> accordingly. (Another option:
130- Your operating system may support <literal>ident</literal> for
131- local connections.)
128+ password to the database superuser. After <command>initdb</command>,
129+ modify <filename>pg_hba.conf</filename> to use <literal>md5</> or
130+ <literal>password</>, instead of <literal>trust</>, authentication
131+ <emphasis>before</> you first start the postmaster. (Other, possibly
132+ more convenient approaches include using <literal>ident</literal>
133+ authentication or filesystem permissions to restrict connections. See
134+ <xref linkend="client-authentication"> for more information.)
132135 </para>
133136
134137 <para>
@@ -172,7 +175,7 @@ NOTICE: Initializing database with en_US collation order.
172175$ <userinput>postmaster -D /usr/local/pgsql/data</userinput>
173176</screen>
174177 which will leave the server running in the foreground. This must
175- again be done while loggedin to the <productname>PostgreSQL</productname> user account. Without
178+ again be done while loggedinto the <productname>PostgreSQL</productname> user account. Without
176179 a <option>-D</option>, the server will try to use the data
177180 directory in the environment variable <envar>PGDATA</envar>; if
178181 neither of these works it will fail.
@@ -2287,7 +2290,7 @@ default:\
22872290 <para>
22882291 On <productname>Linux</productname>
22892292 <filename>/proc/sys/fs/file-max</filename> determines the
2290- maximum number of files that the kernel willallocate . It can
2293+ maximum number ofopen files that the kernel willsupport . It can
22912294 be changed by writing a different number into the file or by
22922295 adding an assignment in <filename>/etc/sysctl.conf</filename>.
22932296 The maximum limit of files per process is fixed at the time the
@@ -2315,6 +2318,16 @@ default:\
23152318 is perhaps what you want, but on dedicated servers you may want to
23162319 raise this limit.
23172320 </para>
2321+
2322+ <para>
2323+ On the other side of the coin, some systems allow individual
2324+ processes to open large numbers of files; if more than a few processes
2325+ do so then the system-wide limit can easily be exceeded. If you find
2326+ this happening, and don't want to alter the system-wide limit, you
2327+ can set <productname>PostgreSQL</productname>'s
2328+ <varname>max_files_per_process</varname> configuration parameter
2329+ to limit its consumption of open files.
2330+ </para>
23182331 </sect2>
23192332
23202333 </sect1>