Solved

FreeBSD: Parallel Postgresql Versions

Posted on 2010-11-29
8
621 Views
Last Modified: 2013-11-22
Hello,

Is it possible to install parallel versions of Postgresql (from ports) on FreeBsd 8.1? I'd like to have 7.4 and 9.0 running on the same machine, listening to different ports.

Thanks!
0
Comment
Question by:alpha-lemming
  • 4
  • 2
  • 2
8 Comments
 
LVL 61

Expert Comment

by:gheist
ID: 34229911
Yes, you can use jail to host incompatible versions of same software.
On the other hand less waste of resources in dump_all-ing old databases and running latest with replication on both servers. Choice is yours.
0
 
LVL 61

Expert Comment

by:gheist
ID: 34229916
PS jail gives different IP for jailed environment, not possible to pipe to other port on primary ip.
0
 
LVL 22

Expert Comment

by:earth man2
ID: 34238687
Yes use different ports and PGDATA environment variable to seperate the action.
0
 
LVL 61

Expert Comment

by:gheist
ID: 34239287
but you cannot use conflicting versions with PGDATA...
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:alpha-lemming
ID: 34290191
Hmm, not quite sure I understand what earthman means...

So, I installed posgtres 9.0 from sources, with "--prefix=/usr/local/pgsql-9.0"

It works fine, but psql is looking for a server running on 5433:

psql: could not connect to server: Connection refused
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5433"?

Open in new window


Where is it getting that port? I can't find a .pgsqlrc anywhere...
0
 

Author Comment

by:alpha-lemming
ID: 34290875
Duh, I buitl it with pgport=5432

So, is it possible with ports, without a jail?
0
 
LVL 61

Accepted Solution

by:
gheist earned 250 total points
ID: 34296148
No it is not possible, sorry.
(it is with forcing to override package dependencies with pkgtools, but it may or may not work afterwards, probably latest client can let old server work)
If you built something on your own ports may not work at all.
0
 
LVL 22

Assisted Solution

by:earth man2
earth man2 earned 250 total points
ID: 34299024
http://www.postgresql.org/docs/9.0/static/runtime-config-file-locations.html

"In a default installation, none of the above parameters are set explicitly. Instead, the data directory is specified by the -D command-line option or the PGDATA environment variable, and the configuration files are all found within the data directory.

If you wish to keep the configuration files elsewhere than the data directory, the postgres -D command-line option or PGDATA environment variable must point to the directory containing the configuration files, and the data_directory parameter must be set in postgresql.conf (or on the command line) to show where the data directory is actually located. Notice that data_directory overrides -D and PGDATA for the location of the data directory, but not for the location of the configuration files. "
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now