Onece I have been in this situation and what I did was create 2 users postgres: postgres93 and postgres94. Ich user whit diferent enviroment variables in the ".bashrc" and it's work great.
Hi all, I have 2 postgres environment 9.3 and 9.4 on the same machine. I try to write a little interactif script to choose 9.3 or 9.4. when connecting as postgres user. That is to say: if choosing 9.3 it launchs '9-3pg_eng.sh' and if choosing 9.4 it launch '9-4pg_env.sh'. I already have both 2 scripts ' 9-3pg_eng.sh' and '9-4pg_env.sh' which run fine. thanks lot