Multiple databases on seperate drives/file systems? - Mailing list pgsql-general

From Scot L. Harris
Subject Multiple databases on seperate drives/file systems?
Date
Msg-id 1086710434.11161.38.camel@lathe
Whole thread Raw
Responses Re: Multiple databases on seperate drives/file systems?
List pgsql-general
I am running postgresql 7.2.4 on a Redhat 8.0 system.

I have been looking for a way to setup another database besides the
initial one setup under /var/lib/pgsql/data on a different file system.

I have found a few references to configuring a separate PGDATA2
environment variable and running the initlocation PGDATA2 followed by
createdb -D PGDATA2 testdb.

The directories are created.

However when executing those steps I get the following error:

-bash-2.05b$ createdb testdb2 -D 'PGDATA2'
ERROR:  Postmaster environment variable 'PGDATA2' not set
createdb: database creation failed


I have verified that PGDATA2 environment variable is set.
-bash-2.05b$ echo $PGDATA2
/vhost/database/data

I have restarted postmaster with the assumption that it needed the
environment variables setup in the postgres users shell.

My guess is that PGDATA2 is not set for some reason for the postmaster
service.  I looked in the init.d/postgresql startup script and can see
where PGDATA is checked for and setup.  I take it that the environment
variables from postgres user are not used?

Is there a way to set databases in different file systems using a single
postmaster service?

--
Scot L. Harris
webid@cfl.rr.com

... mindreading equipment is currently classified CIA property at
best (hello echelon!)

    - Alan Cox on linux-kernel


pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: The pgreplication project
Next
From: Richard Huxton
Date:
Subject: Re: Multiple databases on seperate drives/file systems?