Unix/Linux Go Back    

RedHat 9 (Linux i386) - man page for initlocation (redhat section 1)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

INITLOCATION(1) 		  PostgreSQL Server Applications		  INITLOCATION(1)

       initlocation - create a secondary PostgreSQL database storage area

       initlocation directory

       initlocation creates a new PostgreSQL secondary database storage area.  See the discussion
       under CREATE DATABASE [create_database(7)] 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.

       In order to use this command you must be logged in (using su, for example) as the database

       To create a database in an alternate location, using an environment variable:

       $ export PGDATA2=/opt/postgres/data

       Stop  and start postmaster so it sees the PGDATA2 environment variable. The system must be
       configured so the postmaster sees PGDATA2 every time it starts. Finally:

       $ initlocation PGDATA2
       $ createdb -D PGDATA2 testdb

       Alternatively, if you allow absolute paths you could write:

       $ initlocation /opt/postgres/data
       $ createdb -D /opt/postgres/data/testdb testdb

       PostgreSQL Administrator's Guide

Application				    2002-11-22				  INITLOCATION(1)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 02:27 AM.