Solved

FreeBSD: Parallel Postgresql Versions

Posted on 2010-11-29
8
629 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
[X]
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
  • 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Get Database Help Now w/ Support & Database Audit

Keeping your database environment tuned, optimized and high-performance is key to achieving business goals. If your database goes down, so does your business. Percona experts have a long history of helping enterprises ensure their databases are running smoothly.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
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.:
Suggested Courses

752 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