From: | Jeff Hoffmann <jeff(at)propertykey(dot)com> |
---|---|
To: | Barnes <aardvark(at)ibm(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: initlocation and createdb |
Date: | 2000-06-14 03:54:35 |
Message-ID: | 394701FB.DA0C396B@propertykey.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Barnes wrote:
>
> Thank you. This works, and is close to what I need, but if I don't launch
> the postmaster from a window with PGDATA2 defined, such as is done with
> "/etc/init.d/postgresql start" or on a system boot, then it doesn't work. I
> tried to export PGDATA2 within /etc/init.d/postgresql, but that didn't work
> for me.
>
> Can I make this work from within /etc/init.d/postgresql, or do have to start
> the postmaster from a shell with the PGDATA2 already defined?
>
> Thanks again.
i'm not 100% sure that this works in all environments, but if your
startup script does a "su -l <username> -c ...", that's likely your
problem. on the systems that i'm familiar with, the -l flag on su will
reset the environment & read the shell startup files (e.g., .profile).
so if you set the variable earlier in the script, it will be cleared out
before the program is actually run. the .profile should be read when
the su is invoked & then variable should be available to you then.
hope this helps,
jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Marc Tardif | 2000-06-14 04:08:01 | Re: Size Limit |
Previous Message | Bruce Momjian | 2000-06-14 02:50:11 | Re: initlocation and createdb |