11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.16 2001/09/03 12:57:50 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/ref/initdb.sgml,v 1.17 2001/09/08 15:24:00 petere Exp $
33Postgres documentation
44-->
55
@@ -9,7 +9,7 @@ Postgres documentation
99 </docinfo>
1010
1111 <refmeta>
12- <refentrytitle id="APP-INITDB-TITLE"><application> initdb</application> </refentrytitle>
12+ <refentrytitle id="APP-INITDB-TITLE">initdb</refentrytitle>
1313 <manvolnum>1</manvolnum>
1414 <refmiscinfo>Application</refmiscinfo>
1515 </refmeta>
@@ -25,12 +25,12 @@ Postgres documentation
2525 <group choice="plain">
2626 <arg>--pgdata </arg>
2727 <arg>-D </arg>
28- <replaceable>dbdir </replaceable>
28+ <replaceable>directory </replaceable>
2929 </group>
3030 <group>
31- <arg>--sysid </arg>
32- <arg>-i </arg>
33- <replaceable>sysid </replaceable>
31+ <arg>--username </arg>
32+ <arg>-U </arg>
33+ <replaceable>username </replaceable>
3434 </group>
3535 <group><arg>--pwprompt</arg><arg>-W</arg></group>
3636 <group>
@@ -49,11 +49,12 @@ Postgres documentation
4949 Description
5050 </title>
5151 <para>
52- <application >initdb</application > creates a new
53- <productname>Postgres </productname> database cluster orsystem. A
54- database cluster is a collection of databases that are managed by a
55- singlepostmaster .
52+ <command >initdb</command > creates a new
53+ <productname>PostgreSQL </productname> database cluster( ordatabase
54+ system). A database cluster is a collection of databases that are
55+ managed by a singleserver instance .
5656 </para>
57+
5758 <para>
5859 Creating a database system consists of creating the directories in which
5960 the database data will live, generating the shared catalog tables
@@ -66,26 +67,23 @@ Postgres documentation
6667 </para>
6768
6869 <para>
69- You must not execute <application>initdb</application> as root; it must
70- be run by the Unix user account that will run the database server.
71- This is because you cannot run the database server as root either, but the
72- server needs to have access to the files <application>initdb</application>
73- creates. Furthermore, during the initialization phase, when there are no
74- users and no access controls installed, <productname>Postgres</productname>
75- will only connect with
76- the name of the current Unix user, so you must log in under the account
77- that will own the server process.
70+ <command>initdb</command> must be run as the user that will own the
71+ server process, because the server needs to have access to the
72+ files and directories that <command>initdb</command> creates.
73+ Since the server may not be run as root, you must not run
74+ <command>initdb</command> as root either. (It will in fact refuse
75+ to do so.)
7876 </para>
7977
8078 <para>
81- Although <application >initdb</application > will attempt to create the
79+ Although <command >initdb</command > will attempt to create the
8280 specified data directory, often it won't have permission to do so,
8381 since the parent of the desired data directory is often a root-owned
8482 directory. To set up an arrangement like this, create an empty data
85- directory as root, then use <application >chown</application > to hand over
83+ directory as root, then use <command >chown</command > to hand over
8684 ownership of that directory to the database user account, then
87- <application >su</application > to become the database user, and
88- finally run <application >initdb</application > as the database user.
85+ <command >su</command > to become the database user, and
86+ finally run <command >initdb</command > as the database user.
8987 </para>
9088
9189 <refsect2>
@@ -94,31 +92,32 @@ Postgres documentation
9492 <para>
9593 <variablelist>
9694 <varlistentry>
97- <term>--pgdata=<replaceable class="parameter">dbdir </replaceable></term>
98- <term>-D <replaceable class="parameter">dbdir </replaceable></term>
95+ <term>--pgdata=<replaceable class="parameter">directory </replaceable></term>
96+ <term>-D <replaceable class="parameter">directory </replaceable></term>
9997 <listitem>
10098 <para>
101- This option specifieswhere in thefile system the database
99+ This option specifies thedirectory where the database system
102100 should be stored. This is the only information required by
103- <application >initdb</application >, but you can avoid writing it by
101+ <command >initdb</command >, but you can avoid writing it by
104102 setting the <envar>PGDATA</envar> environment variable, which
105103 can be convenient since the database server
106- (<filename >postmaster</filename >) can find the database
104+ (<command >postmaster</command >) can find the database
107105 directory later by the same variable.
108106 </para>
109107 </listitem>
110108 </varlistentry>
111109
112110 <varlistentry>
113- <term>--sysid =<replaceable class="parameter">sysid </replaceable></term>
114- <term>-i <replaceable class="parameter">sysid </replaceable></term>
111+ <term>--username =<replaceable class="parameter">username </replaceable></term>
112+ <term>-U <replaceable class="parameter">username </replaceable></term>
115113 <listitem>
116114 <para>
117- Selects the system id of the database superuser. This defaults
118- to the effective user id of the user running
119- <application>initdb</application>. It is really not important
120- what the superuser's sysid is, but one might choose to start
121- the numbering at some number like 1.
115+ Selects the user name of the database superuser. This defaults
116+ to the name of the effective user running
117+ <command>initdb</command>. It is really not important what the
118+ superuser's name is, but one might choose to keep the
119+ customary name <quote>postgres</quote>, even if the operating
120+ system user's name is different.
122121 </para>
123122 </listitem>
124123 </varlistentry>
@@ -128,7 +127,7 @@ Postgres documentation
128127 <term>-W</term>
129128 <listitem>
130129 <para>
131- Makes <application >initdb</application > prompt for a password
130+ Makes <command >initdb</command > prompt for a password
132131 to give the database superuser. If you don't plan on using password
133132 authentication, this is not important. Otherwise you won't be
134133 able to use password authentication until you have a password
@@ -162,7 +161,7 @@ Postgres documentation
162161 <term>-L <replaceable class="parameter">directory</replaceable></term>
163162 <listitem>
164163 <para>
165- Specifies where <application >initdb</application > should find
164+ Specifies where <command >initdb</command > should find
166165 its input files to initialize the database system. This is
167166 normally not necessary. You will be told if you need to
168167 specify their location explicitly.
@@ -175,7 +174,7 @@ Postgres documentation
175174 <term>-n</term>
176175 <listitem>
177176 <para>
178- By default, when <application >initdb</application >
177+ By default, when <command >initdb</command >
179178determines that an error prevented it from completely creating the database
180179system, it removes any files it may have created before discovering
181180that it can't finish the job. This option inhibits tidying-up and is
@@ -191,7 +190,7 @@ Postgres documentation
191190 <para>
192191Print debugging output from the bootstrap backend and a few other
193192 messages of lesser interest for the general public.
194- The bootstrap backend is the program <application >initdb</application >
193+ The bootstrap backend is the program <command >initdb</command >
195194uses to create the catalog tables. This option generates a tremendous
196195amount of extremely boring output.
197196 </para>
@@ -205,11 +204,30 @@ Postgres documentation
205204 </refsect1>
206205
207206 <refsect1>
208- <title>See also</title>
207+ <title>Environment</title>
208+
209+ <variablelist>
210+ <varlistentry>
211+ <term><envar>PGDATA</envar></term>
212+
213+ <listitem>
214+ <para>
215+ Specifies the directory where the database system is to be
216+ stored; may be overridden using the <option>-D</option> option.
217+ </para>
218+ </listitem>
219+ </varlistentry>
220+ </variablelist>
221+ </refsect1>
222+
223+ <refsect1>
224+ <title>See Also</title>
209225
210- <simpara>
211- <citetitle>PostgreSQL Administrator's Guide</citetitle>
212- </simpara>
226+ <simplelist type="inline">
227+ <member><xref linkend="app-postgres"></member>
228+ <member><xref linkend="app-postmaster"></member>
229+ <member><citetitle>PostgreSQL Administrator's Guide</citetitle></member>
230+ </simplelist>
213231 </refsect1>
214232
215233</refentry>