Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

FreeBSD: Parallel Postgresql Versions

Posted on 2010-11-29
8
Medium Priority
?
638 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 62

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 62

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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 62

Expert Comment

by:gheist
ID: 34239287
but you cannot use conflicting versions with PGDATA...
0
 

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 62

Accepted Solution

by:
gheist earned 1000 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 1000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.
Suggested Courses

916 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