]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/initlocation.sgml
c4c2d182ae97bb457345e87693ad3d0700157ca6
[postgresql] / doc / src / sgml / ref / initlocation.sgml
1 <!--
2 $Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.10 2000/10/05 19:48:18 momjian Exp $
3 Postgres documentation
4 -->
5
6 <refentry id="APP-INITLOCATION">
7  <refmeta>
8   <refentrytitle id="APP-INITLOCATION-TITLE">
9    <application>initlocation</application>
10   </refentrytitle>
11   <refmiscinfo>Application</refmiscinfo>
12  </refmeta>
13  <refnamediv>
14   <refname>
15    <application>initlocation</application>
16   </refname>
17   <refpurpose>
18    Create a secondary <productname>Postgres</productname> database storage area
19   </refpurpose>
20  </refnamediv>
21  <refsynopsisdiv>
22   <refsynopsisdivinfo>
23    <date>2000-01-17</date>
24   </refsynopsisdivinfo>
25   <synopsis>
26 initlocation <replaceable class="parameter">directory</replaceable>
27   </synopsis>
28
29   <refsect2 id="R2-APP-INITLOCATION-1">
30    <refsect2info>
31     <date>1998-10-02</date>
32    </refsect2info>
33    <title>
34     Inputs
35    </title>
36    <para>
37
38     <variablelist>
39      <varlistentry>
40       <term><replaceable class="parameter">directory</replaceable></term>
41       <listitem>
42        <para>
43         Where in your Unix filesystem do you want alternate databases to go?
44        </para>
45       </listitem>
46      </varlistentry>
47
48     </variablelist>
49    </para>
50   </refsect2>
51
52   <refsect2 id="R2-APP-INITLOCATION-2">
53    <refsect2info>
54     <date>1998-09-26</date>
55    </refsect2info>
56    <title>
57     Outputs
58    </title>
59    <para>
60     <application>initlocation</application> will create directories in 
61     the specified place.
62    </para>
63   </refsect2>
64  </refsynopsisdiv>
65
66  <refsect1 id="R1-APP-INITLOCATION-1">
67   <refsect1info>
68    <date>1998-09-26</date>
69   </refsect1info>
70   <title>
71    Description
72   </title>
73   <para>
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.
80   </para>
81   <para>
82    In order to use this command you must be logged in (using 'su', for example)
83    as the database superuser.
84   </para>
85  </refsect1>
86
87  <refsect1 id="R1-APP-INITLOCATION-2">
88   <refsect1info>
89    <date>1998-09-26</date>
90   </refsect1info>
91   <title>
92    Usage
93   </title>
94   <para>
95    To create a database in an alternate location, using an environment variable:
96 <programlisting>
97 $ export PGDATA2=/opt/postgres/data
98 </programlisting>
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
101 starts.
102 <programlisting>
103 $ initlocation PGDATA2
104 $ createdb -D 'PGDATA2' 'testdb' 
105 </programlisting>
106   </para>
107
108   <para>
109   Alternatively, if you allow absolute paths you could write:
110 <programlisting>
111 $ initlocation /opt/postgres/data
112 $ createdb -D '/opt/postgres/data/testdb' testdb 
113 </programlisting>
114   </para>
115  </refsect1>
116 </refentry>
117
118 <!-- Keep this comment at the end of the file
119 Local variables:
120 mode: sgml
121 sgml-omittag:nil
122 sgml-shorttag:t
123 sgml-minimize-attributes:nil
124 sgml-always-quote-attributes:t
125 sgml-indent-step:1
126 sgml-indent-data: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
132 End:
133 -->