Re: createdb -- alternate locations

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Richard J(dot) Kuhns" <rjk(at)grauel(dot)com>
Cc: "J(dot)R(dot)" <jrbelding(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: createdb -- alternate locations
Date: 2000-05-26 14:58:59
Message-ID: 200005261458.KAA22982@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> J.R. writes:
> > Hello:
> >
> > Novice, just installed PGSQL 7.0 on Redhat 6.1.
> >
> > Everything went smoothly with initial installation and db setup.
> > However, I've run into some problems subsequently.
> >
> > To keep it simple, here is a specific problem. Attempting to create a
> > database in an alternate location, I went through the following steps as
> > the superuser (postgres):
> >
> > mkdir /home/postgres/testdata
> > export PGDATA2=/home/postgres/testdata
> > initlocation PGDATA2
> > createdb testdb -D 'PGDATA2'
> >
> > the last command failed with this error:
> > "The database path 'PGDATA2' in invalid. This may be due to a character
> > that is not allowed or because the chosen path isn't permitted for
> > databases"
> >
> > I also tried createdb -D 'PGDATA2' testdb, same result.
> >
> >
> > Any ideas what I'm doing wrong?
>
> What a coincidence; I just asked about this last week. What you've got is
> right, but before you can createdb, you've got to stop and restart the
> postmaster with "PGDATA2=/home/postgres/testdata" in its environment.

OK, I have udpated initlocation manual pages to mention stop/restart of
postmaster and that this must be defined everytime the postmaster
starts. Do we allow absolute paths in initlocation anymore? I am not
sure.

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2000-05-26 15:22:00 Re: createdb -- alternate locations
Previous Message Matthias Urlichs 2000-05-26 14:52:43 Re: Speed of locating tables?