How do I set the PGDATA2 variable for the (RedHat 7.2) postgres user (no /home/postgres installed: /etc/password references /var/lib/pgsql) to be able to do a "createdb -U rarch -D 'PGDATA2' databasename"?
My efforts to su to postgres and do an "export PGDATA2="/usr/local/pgsql/data2" " and then starting the postmaster daemon result in an "postmaster PGDATA2 variable not set" error. Tried again via .bash_profile in /var/lib/pgsql: same error.
What can I do to make this work? I guess I want to now how I can set environmental variables for non-priviledged users (as 'postgres' is).
BTW: all is needed to use a secondary db location as RH set the PGDATA variable to var/lib/pgsql wich is quite a small partition on my laptop and thus cannot accomodate *any* extra dbases besides templates 0 and 1!
My efforts to su to postgres and do an "export PGDATA2="/usr/local/pgsql/data2" " and then starting the postmaster daemon result in an "postmaster PGDATA2 variable not set" error. Tried again via .bash_profile in /var/lib/pgsql: same error.
What can I do to make this work? I guess I want to now how I can set environmental variables for non-priviledged users (as 'postgres' is).
BTW: all is needed to use a secondary db location as RH set the PGDATA variable to var/lib/pgsql wich is quite a small partition on my laptop and thus cannot accomodate *any* extra dbases besides templates 0 and 1!