Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

FreeBSD: Parallel Postgresql Versions

Posted on 2010-11-29
8
627 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Suggested Solutions

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…
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

792 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