Running PostgreSQL 7 & 8 Simultaneously

Bill Moran wmoran at potentialtech.com
Tue Apr 29 17:05:16 UTC 2008


In response to "Andy Christianson" <achristianson at orases.com>:

> I need to run two different versions of PostgreSQL. Currently my server
> is configured to use PostgreSQL 7.4 and I need to also run PostgreSQL
> 8.3. I noticed that there are different ports for different versions of
> PostgreSQL. If I install the port for 8.3, will that cause any problems
> with my existing 7.4 configuration? 8.3 will need to run on a different
> port, of course, but other than that I can't think of any other issues.
> 
>  
> 
> Thanks in advance for any advice.

The ports collection does not support this directly, however it's not
too difficult to set up.

Ports won't allow you to install two different version of PostgreSQL
simultaneously, so the two choices you have are:
1) Install one from the ports and the other manually.
2) Use the jail system to create FreeBSD virtual machines to install
   the different versions in.

I like #2 the best, personally, but I've done it both ways.  With #1,
you have to ensure they're configured to use different directories
for their data files, and that they listen on different ports.  With
#2, you have to change the UID of the pgsql user in each jail so they
don't overwrite each other's shared memory, and enable SYSV SHM for
jails (via sysctl)

-- 
Bill Moran
http://www.potentialtech.com


More information about the freebsd-questions mailing list