Forum OpenACS Q&A: Re: wrong PATH for postgres following installation doc -PLS HLP

Tom, no, it is not. I haven't had to do that myself yet, but I've thought about it. For two PostgreSQL installs - or two Oracle isntances, it's the same situation - you want essentially two versions of that script profile-postgres.sh, one for each instance (or pass in a parameter to the script saying which instance you want, whatever).

Clients using one instance or another source the appropriate script. Your only decision to make, is if one instance should be the default - if so, source that instance's profile-postgres.sh from /etc/profile, and not the other. If you don't want any default instance, then source neither script from /etc/profile - now in order to use the database, each client must take a explicit action. But that action is just sourcing the script. This is way I said to put the settings into profile-postgres.sh, not directly into /etc/profile.

Having two instances changes nothing important - these are still system-wide settings that should be in a system-wide place. What you want to avoid is having the exact same settings hard-coded into lots of different places - put each in one place only, whenever feasible.