Can't create clusters in PostgreSQL 9.0
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?
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/...