2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
6 <refentry id="APP-INITLOCATION">
8 <refentrytitle id="APP-INITLOCATION-TITLE">
9 <application>initlocation</application>
11 <refmiscinfo>Application</refmiscinfo>
15 <application>initlocation</application>
18 Create a secondary <productname>Postgres</productname> database storage area
23 <date>2000-01-17</date>
26 initlocation <replaceable class="parameter">directory</replaceable>
29 <refsect2 id="R2-APP-INITLOCATION-1">
31 <date>1998-10-02</date>
40 <term><replaceable class="parameter">directory</replaceable></term>
43 Where in your Unix filesystem do you want alternate databases to go?
52 <refsect2 id="R2-APP-INITLOCATION-2">
54 <date>1998-09-26</date>
60 <application>initlocation</application> will create directories in
66 <refsect1 id="R1-APP-INITLOCATION-1">
68 <date>1998-09-26</date>
74 <application>initlocation</application>
75 creates a new <productname>Postgres</productname> secondary database storage area.
76 See the discussion under <xref linkend="SQL-CREATEDATABASE" endterm="SQL-CREATEDATABASE-title">
77 about how to manage and use secondary storage areas. If the argument does not contain
78 a slash and is not valid as a path, it is assumed to be an environment variable,
79 which is referenced. See the examples at the end.
82 In order to use this command you must be logged in (using 'su', for example)
83 as the database superuser.
87 <refsect1 id="R1-APP-INITLOCATION-2">
89 <date>1998-09-26</date>
95 To create a database in an alternate location, using an environment variable:
97 $ export PGDATA2=/opt/postgres/data
99 Start and stop postmaster so it sees the $PGDATA2 environment variable.
100 The system must be configured so the postmaster sees $PGDATA2 every time it
103 $ initlocation PGDATA2
104 $ createdb -D 'PGDATA2' 'testdb'
109 Alternatively, if you allow absolute paths you could write:
111 $ initlocation /opt/postgres/data
112 $ createdb -D '/opt/postgres/data/testdb' testdb
118 <!-- Keep this comment at the end of the file
123 sgml-minimize-attributes:nil
124 sgml-always-quote-attributes:t
127 sgml-parent-document:nil
128 sgml-default-dtd-file:"../reference.ced"
129 sgml-exposed-tags:nil
130 sgml-local-catalogs:"/usr/lib/sgml/catalog"
131 sgml-local-ecat-files:nil