Skip site navigation (1) Skip section navigation (2)

Re: Alternate Database Locations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brian C(dot) Doyle" <bcdoyle(at)mindspring(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Alternate Database Locations
Date: 2000-10-26 14:02:13
Message-ID: 5390.972568933@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
"Brian C. Doyle" <bcdoyle(at)mindspring(dot)com> writes:
> Okay I am still doing something wrong here
> I set PGDATA2=/home/user1/database
> export PGDATA2

> then I start postmaster
> postmaster -d PGDATA2 -i -p  5431 &

I think you are confusing the "alternate database directory" stuff with
having a separate installation (primary directory).  To set up a second
postmaster, you first have to initdb its installation directory:

	initdb -D /home/user1/database

then start the postmaster like so:

	postmaster -D /home/user1/database -p whatever ...

Instead of -D (note upper case), you can alternatively set env variable
PGDATA for these two programs.

The stuff in the manual about alternate database directories is to allow
a *single* postmaster to manage databases located somewhere other than
underneath its installation directory.  It's got nothing at all to do
with starting additional postmasters.

			regards, tom lane

In response to

Responses

pgsql-sql by date

Next:From: Sandis JericsDate: 2000-10-26 14:48:26
Subject: HELP! ... pg_locale ???
Previous:From: Tomas BerndtssonDate: 2000-10-26 13:53:09
Subject: Re: Query Problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group