Re: Multiple databases on seperate drives/file systems?

From: jseymour(at)linxnet(dot)com (Jim Seymour)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple databases on seperate drives/file systems?
Date: 2004-06-08 21:01:43
Message-ID: 20040608210143.1B03E430E@jimsun.linxnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Scot L. Harris" <webid(at)cfl(dot)rr(dot)com> wrote:
>
[snip]
>
> Yes I have tried it without quoting the PGDATA2. Same result.
>
> I have also tried the full path but the flag is apparently not set to
> allow that.
>
> Besides the error I am getting it appears to me that postmaster would
> not be able to find this new location for the new database. From
> looking at the startup script in init.d it looks like it has PGDATA hard
> coded and I did not see any place in the other config files to specify
> additional database locations.
>
> It seems like I am missing a piece of the puzzle.

Perhaps the man pages are screwed-up?

$ man createdb
[snip]
-D location

--location location
Specifies the alternative location for the database.
See also initlocation(1).

$ man initlocation
[snip]
EXAMPLES
To create a database in an alternate location, using an
environment variable:

$ export PGDATA2=/opt/postgres/data

Stop and start postmaster so it sees the PGDATA2 environment
variable. The system must be configured so the postmaster
sees PGDATA2 every time it starts. Finally:

$ initlocation PGDATA2
$ createdb -D PGDATA2 testdb

Alternatively, if you allow absolute paths you could write:

$ initlocation /opt/postgres/data
$ createdb -D /opt/postgres/data/testdb testdb

From this I gather that what they *mean*, for the initlocation and
createdb commands, is $PGDATA2. (Note the "$".)

Jim

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim Seymour 2004-06-08 21:05:33 Re: Prevent users from creating tables
Previous Message Scott Ribe 2004-06-08 20:29:40 OS X & thread safety