1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2002-10-12 01:03:48 +02:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/initlocation.sgml,v 1.17 2002/10/11 23:03:48 petere Exp $
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refentry id="APP-INITLOCATION">
|
|
|
|
<refmeta>
|
2000-11-12 00:01:45 +01:00
|
|
|
<refentrytitle id="APP-INITLOCATION-TITLE"><application>initlocation</application></refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
1999-07-06 19:16:42 +02:00
|
|
|
<refmiscinfo>Application</refmiscinfo>
|
|
|
|
</refmeta>
|
2000-11-12 00:01:45 +01:00
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
<refnamediv>
|
2000-11-12 00:01:45 +01:00
|
|
|
<refname>initlocation</refname>
|
2001-09-03 14:57:50 +02:00
|
|
|
<refpurpose>create a secondary <productname>PostgreSQL</productname> database storage area</refpurpose>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refnamediv>
|
1998-12-29 03:24:47 +01:00
|
|
|
|
2000-11-12 00:01:45 +01:00
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>initlocation</command>
|
|
|
|
<arg choice="plain"><replaceable>directory</replaceable></arg>
|
|
|
|
</cmdsynopsis>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1 id="R1-APP-INITLOCATION-1">
|
2000-11-12 00:01:45 +01:00
|
|
|
<title>Description</title>
|
1999-07-06 19:16:42 +02:00
|
|
|
<para>
|
|
|
|
<application>initlocation</application>
|
2001-12-08 04:24:40 +01:00
|
|
|
creates a new <productname>PostgreSQL</productname> secondary database storage area.
|
2000-01-18 01:03:37 +01:00
|
|
|
See the discussion under <xref linkend="SQL-CREATEDATABASE" endterm="SQL-CREATEDATABASE-title">
|
|
|
|
about how to manage and use secondary storage areas. If the argument does not contain
|
|
|
|
a slash and is not valid as a path, it is assumed to be an environment variable,
|
|
|
|
which is referenced. See the examples at the end.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
|
|
|
<para>
|
2001-09-13 17:55:24 +02:00
|
|
|
In order to use this command you must be logged in (using <command>su</command>, for example)
|
2000-10-05 21:48:34 +02:00
|
|
|
as the database superuser.
|
1999-07-06 19:16:42 +02:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id="R1-APP-INITLOCATION-2">
|
2002-07-28 17:22:21 +02:00
|
|
|
<title>Examples</title>
|
1999-07-06 19:16:42 +02:00
|
|
|
|
2000-11-12 00:01:45 +01:00
|
|
|
<para>
|
|
|
|
To create a database in an alternate location, using an
|
|
|
|
environment variable:
|
|
|
|
<screen>
|
|
|
|
<prompt>$ </prompt><userinput>export PGDATA2=/opt/postgres/data</userinput>
|
|
|
|
</screen>
|
|
|
|
Stop and start postmaster so it sees the <envar>PGDATA2</envar>
|
|
|
|
environment variable. The system must be configured so the
|
|
|
|
postmaster sees <envar>PGDATA2</envar> every time it starts. Finally:
|
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>initlocation PGDATA2</userinput>
|
|
|
|
<prompt>$</prompt> <userinput>createdb -D PGDATA2 testdb</userinput>
|
|
|
|
</screen>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Alternatively, if you allow absolute paths you could write:
|
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>initlocation /opt/postgres/data</userinput>
|
|
|
|
<prompt>$</prompt> <userinput>createdb -D /opt/postgres/data/testdb testdb</userinput>
|
|
|
|
</screen>
|
|
|
|
</para>
|
1999-07-06 19:16:42 +02:00
|
|
|
</refsect1>
|
2002-07-28 17:22:21 +02:00
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>See Also</title>
|
|
|
|
|
|
|
|
<simplelist type="inline">
|
|
|
|
<member><citetitle>PostgreSQL Administrator's Guide</citetitle></member>
|
|
|
|
</simplelist>
|
|
|
|
</refsect1>
|
|
|
|
|
1999-07-06 19:16:42 +02:00
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:nil
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|