initlocation
  
  Application
 
 
  
   initlocation
  
  
   Create a secondary Postgres database storage area
  
 
 
  
   2000-01-17
  
  
initlocation directory
  
  
   
    1998-10-02
   
   
    Inputs
   
   
    
     
      directory
      
       
	Where in your Unix filesystem do you want alternate databases to go?
       
      
     
    
   
  
  
   
    1998-09-26
   
   
    Outputs
   
   
    initlocation will create directories in 
    the specified place.
   
  
 
 
  
   1998-09-26
  
  
   Description
  
  
   initlocation 
   creates a new Postgres secondary database storage area.
   See the discussion under 
   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)
   the database superuser.
  
 
 
  
   1998-09-26
  
  
   Usage
  
  
   To create a database in an alternate location, using an environment variable:
$ export PGDATA2=/opt/postgres/data
Start and stop postmaster so it sees the $PGDATA2 environment variable.
The system must be configured so the postmaster sees $PGDATA2 every time it
starts.
$ 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