Re: Alternate database locations
От | Glen Parker |
---|---|
Тема | Re: Alternate database locations |
Дата | |
Msg-id | 013401c1b983$f875d250$0b01a8c0@johnpark.net обсуждение исходный текст |
Ответ на | Alternate database locations (Rich Shepard <rshepard@appl-ecosys.com>) |
Ответы |
Re: Alternate database locations
|
Список | pgsql-general |
> I want to set up a database in a directory other than > /var/lib/pgsql/data/, so in both postgres' ~/.bash_profile and my > ~/.bash_profile I added the line: > > PGDATA2="/opt/paisley/"; export PGDATA2 > <snip> > ERROR: Postmaster environment variable 'PGDATA2' not set > createdb: database creation failed your init script is using the '-s /bin/sh' argument to 'su', which means bash runs in compat mode (sh is a soft link to bash on linux), and does not use .bash_profile. you need to set up a file ~postgres/.profile (along side of .bash_profile) and put your PGDATA2 environment export in there, or possibly source .profile from .bash_profile. restart the postmaster and it should now work. guys, is there a good reason why the init script has to specify a shell explicitly? the passwd entry for postgres should be good enough it seems like... changing the init script at install time is a bad solution because it gets over-written on postgres upgrades from RPM. and adding a .profile file is not exactly intuative, and the need for it is not documented anywhere that i could find. Glen
В списке pgsql-general по дате отправления: