Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




initlocation

initlocation

Name

initlocation — Create a secondary Postgres database storage area
initlocation directory
  

Inputs

directory

Where in your Unix filesystem do you want alternate databases to go?

Outputs

initlocation will create directories in the specified place.

Description

initlocation creates a new Postgres secondary database storage area. See the discussion under CREATE DATABASE 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.

Usage

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

$ export PGDATA2=/opt/postgres/data
$ initlocation PGDATA2
$ createdb 'testdb' -D 'PGDATA2'

Alternatively, if you allow absolute paths you could write:

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



With any suggestions or questions please feel free to contact us