Re: Alternate locations of DB's

From: oberpwd(at)anubis(dot)network(dot)com (Wade D(dot) Oberpriller)
To: brian(at)jbbent(dot)com (Brian C(dot) Doyle)
Cc: pgsql-general(at)postgresql(dot)org (general-help postgresql)
Subject: Re: Alternate locations of DB's
Date: 2000-10-26 14:16:08
Message-ID: 200010261416.JAA11632@truck.network.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You must use initlocation to initialize the location and have the path to the
location in an environment variable before postmaster is started.

For example:

> setenv PGDATA2 /home/someuser/data
> initlocation 'PGDATA2'
> pg_ctl -D /home/pgsql/data start
> createdb mydb -D 'PGDATA2'

This will start postmaster with the knowlegde of the PGDATA2 environment
variable. Then you can create databases in this alternate location.
PostgreSQL can also be compiled with an option to allow absolute paths, so

>createdb cdt -D /home/someuser/data

can be done, but I forget the option. The user's manual describes all of this
under CREATEDB.

Wade Oberpriller
StorageTek
oberpwd(at)network(dot)com

>
> Hello all,
>
> How do I get Postgresql to use independantly seperate db
> locations. Currently I have them under /home/user/database and as long as
> i get postmaster to run with that same location I am fine but I want to have
> /home/user/database
> /home/user1/database
> /home/userr2/database
> ect...
>
> But I can only get one instance of the postmaster running at a time . How
> do i change that if i can!
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trond Eivind =?iso-8859-1?q?Glomsr=F8d?= 2000-10-26 14:20:32 7.0 vs. 7.1 (was: latest version?)
Previous Message Andrew Sullivan 2000-10-26 14:01:27 Re: phpPgAdmin