Multiple databases on seperate drives/file systems?

From: "Scot L(dot) Harris" <webid(at)cfl(dot)rr(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Multiple databases on seperate drives/file systems?
Date: 2004-06-08 16:00:34
Message-ID: 1086710434.11161.38.camel@lathe
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cfl(dot)rr(dot)com

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

- Alan Cox on linux-kernel

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Ryan 2004-06-08 16:09:38 Re: [HACKERS] [GENERAL] The pgreplication project
Previous Message Jan Wieck 2004-06-08 15:55:38 Re: [GENERAL] The pgreplication project