Re: Multiple databases on seperate drives/file systems?
От | Scot L. Harris |
---|---|
Тема | Re: Multiple databases on seperate drives/file systems? |
Дата | |
Msg-id | 1086788709.20203.8.camel@lathe обсуждение исходный текст |
Ответ на | Re: Multiple databases on seperate drives/file systems? (jseymour@linxnet.com (Jim Seymour)) |
Ответы |
Re: Multiple databases on seperate drives/file systems?
Re: Multiple databases on seperate drives/file systems? |
Список | pgsql-general |
On Tue, 2004-06-08 at 17:01, Jim Seymour wrote: > 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 I started trying this using the man pages instructions. With the $ included I get the following results: -bash-2.05b$ createdb -D $PGDATA2 testdb3 ERROR: Absolute paths are not allowed as database locations createdb: database creation failed Without the $ I get the following: -bash-2.05b$ createdb -D PGDATA2 testdb3 ERROR: Postmaster environment variable 'PGDATA2' not set createdb: database creation failed -bash-2.05b$ echo $PGDATA2 /vhost/database/data Which indicates to me that the PGDATA2 environment variable that is defined in the postgres users .bash_profile is not being picked up by the postmaster process. Which I have restarted numerous times in an effort to get it to pick that variable up. I am beginning to suspect that I would have to find a way to add the PGDATA2 variable to the startup script for postgresql. Which the docs I have read so far do not indicate as being required. Any more ideas before I have to go hacking on the startup script? -- Scot L. Harris webid@cfl.rr.com Real computer scientists don't comment their code. The identifiers are so long they can't afford the disk space.
В списке pgsql-general по дате отправления: