Commit a1642132 authored by Peter Eisentraut's avatar Peter Eisentraut

New and revised material for Admin guide, re backup & restore and database

management
parent 385470f8
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.23 2000/06/18 21:24:51 petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/admin.sgml,v 1.24 2000/06/30 16:14:21 petere Exp $
Postgres Administrator's Guide.
Derived from postgres.sgml.
......@@ -21,16 +21,15 @@ Derived from postgres.sgml.
<!entity install SYSTEM "install.sgml">
<!entity installw SYSTEM "install-win32.sgml">
<!entity layout SYSTEM "layout.sgml">
<!entity manage-ag SYSTEM "manage-ag.sgml">
<!entity ports SYSTEM "ports.sgml">
<!entity recovery SYSTEM "recovery.sgml">
<!entity regress SYSTEM "regress.sgml">
<!entity release SYSTEM "release.sgml">
<!entity runtime SYSTEM "runtime.sgml">
<!entity client-auth SYSTEM "client-auth.sgml">
<!entity manage-ag SYSTEM "manage-ag.sgml">
<!entity user-manag SYSTEM "user-manag.sgml">
<!entity start-ag SYSTEM "start-ag.sgml">
<!entity trouble SYSTEM "trouble.sgml">
<!entity backup SYSTEM "backup.sgml">
<!entity recovery SYSTEM "recovery.sgml">
<!entity regress SYSTEM "regress.sgml">
<!entity biblio SYSTEM "biblio.sgml">
]>
......@@ -113,9 +112,9 @@ Your name here...
&installw;
&runtime;
&client-auth;
&user-manag;
&start-ag;
&manage-ag;
&user-manag;
&backup;
&recovery;
&regress;
&release;
......
This diff is collapsed.
This diff is collapsed.
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/start-ag.sgml,v 1.11 2000/06/18 21:24:51 petere Exp $
- This file currently contains several small chapters.
- Each chapter should be split off into a separate source file...
- - thomas 1998-02-24
-->
<chapter id="disk">
<title>Disk Management</title>
<sect1>
<title>Alternate Locations</title>
<para>
It is possible to create a database in a location other than the default
location for the installation. Remember that all database access actually
occurs through the database backend, so that any location specified must
be accessible by the backend.
</para>
<para>
Alternate database locations are created and referenced by an environment variable
which gives the absolute path to the intended storage location.
This environment variable must have been defined before the backend was started
and must be writable by the postgres administrator account.
Any valid environment variable name may be used to reference an alternate
location, although using variable name with a prefix of PGDATA is recommended
to avoid confusion and conflict with other variables.
</para>
<note>
<para>
In previous versions of <productname>Postgres</productname>,
it was also permissable to use an absolute path name
to specify an alternate storage location.
The environment variable style of specification
is to be preferred since it allows the site administrator more flexibility in
managing disk storage.
If you prefer using absolute paths, you may do so by defining
"ALLOW_ABSOLUTE_DBPATHS" and recompiling <productname>Postgres</productname>
To do this, either add this line
<programlisting>
#define ALLOW_ABSOLUTE_DBPATHS 1
</programlisting>
to the file <filename>src/include/config.h</filename>, or by specifying
<programlisting>
CFLAGS+= -DALLOW_ABSOLUTE_DBPATHS
</programlisting>
in your <filename>Makefile.custom</filename>.
</para>
</note>
<para>
Remember that database creation is actually performed by the database backend.
Therefore, any environment variable specifying an alternate location must have
been defined before the backend was started. To define an alternate location
PGDATA2 pointing to <filename>/home/postgres/data</filename>, first type
<programlisting>
% setenv PGDATA2 /home/postgres/data
</programlisting>
to define the environment variable to be used with subsequent commands.
Usually, you will want to define this variable in the
<productname>Postgres</productname> superuser's
<filename>.profile</filename>
or
<filename>.cshrc</filename>
initialization file to ensure that it is defined upon system startup.
Any environment variable can be used to reference alternate location,
although it is preferred that the variables be prefixed with "PGDATA"
to eliminate confusion and the possibility of conflicting with or
overwriting other variables.
</para>
<para>
To create a data storage area in PGDATA2, ensure
that <filename>/home/postgres</filename> already exists and is writable
by the postgres administrator.
Then from the command line, type
<programlisting>
% setenv PGDATA2 /home/postgres/data
% initlocation $PGDATA2
Creating Postgres database system directory /home/postgres/data
Creating Postgres database system directory /home/postgres/data/base
</programlisting>
</para>
<para>
To test the new location, create a database <database>test</database> by typing
<programlisting>
% createdb -D PGDATA2 test
% dropdb test
</programlisting>
</para>
</sect1>
</chapter>
<!-- 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:
-->
......@@ -56,7 +56,7 @@ CREATE USER <replaceable>name</replaceable>
constrained in its login name by her real name.)
</para>
<sect2>
<sect2 id="user-attributes">
<title>User attributes</title>
<para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment