Re: Alternate locations of DB's - Mailing list pgsql-general

From oberpwd@anubis.network.com (Wade D. Oberpriller)
Subject Re: Alternate locations of DB's
Date
Msg-id 200010261416.JAA11632@truck.network.com
Whole thread Raw
In response to Alternate locations of DB's  ("Brian C. Doyle" <brian@jbbent.com>)
List 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@network.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!
>
>
>


pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: phpPgAdmin
Next
From: "Kiyo Kelvin Lee"
Date:
Subject: Re: Alternate locations of DB's