Solved

FreeBSD: Parallel Postgresql Versions

Posted on 2010-11-29
8
628 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

679 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