Search Postgresql Archives

Re: Running multiple versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 5, 2012 at 9:48 PM, Nishad Prakash <prakashn@xxxxxxx> wrote:
>
> I'd like to keep my current installation (8.3.3) alive and running while
> installing and running 9.1.2 on the same server.  Can I do this using only
> the existing postgres superuser account?  I'd want to create two different
> initdb locations, and run the versions on different ports, of course, but it
> seems like the superuser's LD_LIBRARY_PATH would be an issue.  Whichever
> .../lib dir it points to, would be the only effective one, and the "other"
> version's programs wouldn't work.  Is there a way around this?  Or am I
> thinking about it all wrong?

So assuming all this is done in regular userland. built from source
etc, you'll need to do a couple things.  Each version needs to be
built with a different --prefix.  I prefer something like
--prefix=/home/myusername/pg83 and --prefix=/home/myusername/pg91 and
so on.  This will put the bin, lib etc stuff in your home dir.  Then
in order to do work in one setup or the other, make a you'll need to
set LD_LIBRARY_PATH and PGDATA accordingly for each instance.  It's
often easiest to just have a simple bash script you can run that sets
those so you can be one user or the other at the running of that
script.  so what might be in one would be something like:

# pg8.3.x stuff file:
export PGDATA /home/myuserdir/pg83/data
export PATH=/usr/bin:/home/myuserdir/pg83/bin
export LD_LIBRARY_PATH=/usr/bin:/home/myuserdir/pg83/lib

# pg9.1.x stuff file:
export PGDATA /home/myuserdir/pg91/data
export PATH=/usr/bin:/home/myuserdir/pg91/bin
export LD_LIBRARY_PATH=/usr/bin:/home/myuserdir/pg91/lib

So you'd ru one file or the other to run that database.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux