Alternate database locations - Mailing list pgsql-general

From Rich Shepard
Subject Alternate database locations
Date
Msg-id Pine.LNX.4.44.0202181937180.24052-100000@salmo.appl-ecosys.com
Whole thread Raw
Responses Re: Alternate database locations  ("Glen Parker" <glenebob@nwlink.com>)
List pgsql-general
  This came up back in the days of postgres-6.x and I was told that it would
be working in the 7.x series. I'm sure that it is, but I'm not doing
something correctly.

  I want to set up a database in a directory other than
/var/lib/pgsql/data/, so in both postgres' ~/.bash_profile and my
~/.bash_profile I added the line:

PGDATA2="/opt/paisley/"; export PGDATA2

then I restarted the postmaster.

  When I try to create a database there I get the message that the
postmaster doesn't know of that directory:

[rshepard@salmo ~]$ createdb --location=PGDATA2 --template=template1 paisley
ERROR:  Postmaster environment variable 'PGDATA2' not set
createdb: database creation failed

  What have I done incorrectly, please?

TIA,

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com
                         http://www.appl-ecosys.com


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Cannot restart the postmaster
Next
From: Tom Lane
Date:
Subject: Re: Default timezones and Postgres