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

From jseymour@linxnet.com (Jim Seymour)
Subject Re: Multiple databases on seperate drives/file systems?
Date
Msg-id 20040608210143.1B03E430E@jimsun.linxnet.com
Whole thread Raw
In response to Re: Multiple databases on seperate drives/file systems?  ("Scot L. Harris" <webid@cfl.rr.com>)
Responses Re: Multiple databases on seperate drives/file systems?
List pgsql-general
"Scot L. Harris" <webid@cfl.rr.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

pgsql-general by date:

Previous
From: jseymour@linxnet.com (Jim Seymour)
Date:
Subject: Re: Prevent users from creating tables
Next
From: CSN
Date:
Subject: using regexp backreferences