From: | "Glen Parker" <glenebob(at)nwlink(dot)com> |
---|---|
To: | "Pg-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Alternate database locations |
Date: | 2002-02-19 20:28:20 |
Message-ID: | 013401c1b983$f875d250$0b01a8c0@johnpark.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Levent | 2002-02-19 20:31:07 | ecpg Question |
Previous Message | Tom Lane | 2002-02-19 20:27:52 | Re: Alternate data location, again |