1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
12
TITLE="PostgreSQL 9.1beta1 Documentation"
13
HREF="index.html"><LINK
15
TITLE="PostgreSQL Server Applications"
16
HREF="reference-server.html"><LINK
18
TITLE="PostgreSQL Server Applications"
19
HREF="reference-server.html"><LINK
21
TITLE="pg_controldata"
22
HREF="app-pgcontroldata.html"><LINK
25
HREF="stylesheet.css"><META
26
HTTP-EQUIV="Content-Type"
27
CONTENT="text/html; charset=ISO-8859-1"><META
29
CONTENT="2011-04-27T21:20:33"></HEAD
35
SUMMARY="Header navigation table"
47
>PostgreSQL 9.1beta1 Documentation</A
56
TITLE="PostgreSQL Server Applications"
57
HREF="reference-server.html"
67
HREF="reference-server.html#AEN82497"
80
TITLE="pg_controldata"
81
HREF="app-pgcontroldata.html"
89
TITLE="pg_controldata"
90
HREF="app-pgcontroldata.html"
111
>initdb -- create a new <SPAN
114
> database cluster</DIV
116
CLASS="REFSYNOPSISDIV"
131
>...] --pgdata | -D <TT
141
NAME="R1-APP-INITDB-1"
154
> database cluster. A database
155
cluster is a collection of databases that are managed by a single
159
> Creating a database cluster consists of creating the directories in
160
which the database data will live, generating the shared catalog
161
tables (tables that belong to the whole cluster rather than to any
162
particular database), and creating the <TT
169
> databases. When you later create a
170
new database, everything in the <TT
174
copied. (Therefore, anything installed in <TT
178
is automatically copied into each database created later.)
182
> database is a default database meant
183
for use by users, utilities and third party applications.
189
> will attempt to create the
190
specified data directory, it might not have permission if the parent
191
directory of the desired data directory is root-owned. To initialize
192
in such a setup, create an empty data directory as root, then use
196
> to assign ownership of that directory to the
197
database user account, then <TT
201
database user to run <TT
210
> must be run as the user that will own the
211
server process, because the server needs to have access to the
212
files and directories that <TT
216
Since the server cannot be run as root, you must not run
220
> as root either. (It will in fact refuse
227
> initializes the database cluster's default
228
locale and character set encoding. The character set encoding,
232
>) and character set classes
236
>, e.g. upper, lower, digit) can be set separately
237
for a database when it is created. <TT
241
those settings for the <TT
244
> database, which will
245
serve as the default for all other databases.
248
> To alter the default collation order or character set classes, use the
256
Collation orders other than <TT
263
a performance penalty. For these reasons it is important to choose the
264
right locale when running <TT
270
> The remaining locale categories can be changed later when the server
271
is started. You can also use <TT
275
default for all locale categories, including collation order and
276
character set classes. All server locale values (<TT
284
More details can be found in <A
290
> To alter the default encoding, use the <TT
294
More details can be found in <A
295
HREF="multibyte.html"
333
> This option specifies the authentication method for local users
341
unless you trust all local users on your system. <TT
345
is the default for ease of installation.
368
> This option specifies the directory where the database cluster
369
should be stored. This is the only information required by
373
>, but you can avoid writing it by
377
> environment variable, which
378
can be convenient since the database server
382
>) can find the database
383
directory later by the same variable.
406
> Selects the encoding of the template database. This will also
407
be the default encoding of any database you create later,
408
unless you override it there. The default is derived from the locale, or
412
> if that does not work. The character sets supported by
416
> server are described
418
HREF="multibyte.html#MULTIBYTE-CHARSET-SUPPORTED"
435
> Sets the default locale for the database cluster. If this
436
option is not specified, the locale is inherited from the
441
support is described in <A
502
>, but only sets the locale in
503
the specified category.
521
> read the database superuser's password
522
from a file. The first line of the file is taken as the password.
545
> Selects the user name of the database superuser. This defaults
546
to the name of the effective user running
550
>. It is really not important what the
551
superuser's name is, but one might choose to keep the
555
>, even if the operating
556
system user's name is different.
572
> prompt for a password
573
to give the database superuser. If you don't plan on using password
574
authentication, this is not important. Otherwise you won't be
575
able to use password authentication until you have a password
599
> This option specifies the directory where the transaction log
608
> Other, less commonly used, parameters are also available:
625
> Print debugging output from the bootstrap backend and a few other
626
messages of lesser interest for the general public.
627
The bootstrap backend is the program <TT
631
uses to create the catalog tables. This option generates a tremendous
632
amount of extremely boring output.
647
> Specifies where <TT
651
its input files to initialize the database cluster. This is
652
normally not necessary. You will be told if you need to
653
specify their location explicitly.
666
> By default, when <TT
670
determines that an error prevented it from completely creating the database
671
cluster, it removes any files it might have created before discovering
672
that it cannot finish the job. This option inhibits tidying-up and is
673
thus useful for debugging.
702
> Show help about <SPAN
733
> Specifies the directory where the database cluster is to be
734
stored; can be overridden using the <TT
743
> This utility, like most other <SPAN
747
also uses the environment variables supported by <SPAN
752
HREF="libpq-envars.html"
768
> can also be invoked via
783
HREF="app-pg-ctl.html"
789
HREF="app-postgres.html"
800
SUMMARY="Footer navigation table"
811
HREF="reference-server.html"
829
HREF="app-pgcontroldata.html"
839
>PostgreSQL Server Applications</TD
845
HREF="reference-server.html"
855
>pg_controldata</SPAN
b'\\ No newline at end of file'