1

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?

1 Answers1

2

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/...
  • 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? –  Jul 09 '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 (https://launchpad.net/~pitti/+archive/postgresql). Check also http://www.piware.de/2010/09/postgresql-9-0-final-released/ – Grzegorz Szpetkowski Jul 09 '11 at 10:49