Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to setup and run multiple clusters of PostgreSQL 9.0 in the same Ubuntu/Debian machine. Debian has a package called 'postgresql-common' to facilitate managing database clusters. However, the version of the package is 8.4, and when I try to execute pg_createcluster command with version 9.0, it says - "Error: invalid version: 9.0". Can anybody please help me in this?

share|improve this question

migrated from stackoverflow.com Jul 9 '11 at 14:08

This question came from our site for professional and enthusiast programmers.

1  
This is off topic, as it's not a programming question. Serverfault would probably be a better place to ask. –  Flimzy Jul 9 '11 at 11:11
    
Ohh, didn't know. Thanks for pointing out. :) –  Sharafat Mollah Mosharraf Jul 9 '11 at 11:37

1 Answer 1

up vote 2 down vote accepted

Are you running on Debian Squeeze ? If so, add backports repository (/etc/apt/sources.list) and update your package list:

deb http://backports.debian.org/debian-backports squeeze-backports main

After that install postgresql-9.0 package and postgresql-common should be updated to dependent version (>= 109~).

To check postgresql-common's version and create new cluster use e.g.:

# aptitude show postgresql-common
...
Version: 113

# pg_createcluster 9.0 testing --start
Creating new...
Configuring postgresql.conf to use port 5434...

$ pg_lsclusters 
Version Cluster   Port Status Owner    Data directory                    Log file
8.4     main      5432 down   postgres /var/lib/postgresql/8.4/main      /var/...
9.0     main      5433 online postgres /var/lib/postgresql/9.0/main      /var/...
9.0     testing   5434 online postgres /var/lib/postgresql/9.0/testing   /var/...
share|improve this answer
    
Well, I'm actually running Ubuntu 10.10. I've installed PostgreSQL 9.0 through EnterpriseDB. So, is there anything I can do in this situation to update postgresql-common to 9.0? –  Sharafat Mollah Mosharraf Jul 9 '11 at 10:33
1  
I think that EnterpriseDB's installer is not integrated with pg_* postgresql-common facilitate. For Ubuntu 10.10 you can install PostgreSQL 9.0 (or try install new postgresql-common only) using PPA repository (launchpad.net/~pitti/+archive/postgresql). Check also piware.de/2010/09/postgresql-9-0-final-released –  Grzegorz Szpetkowski Jul 9 '11 at 10:49
    
Brilliant!!! Thanks a lot... :) –  Sharafat Mollah Mosharraf Jul 9 '11 at 11:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.