When having two versions of PostgreSQL on the same machine, need to use --cluster option for all psql command - psql, createuser, createdb, dropdb etc. The format is:- psql --cluster version/cluster $ pg_lsclusters Version Cluster Port Status Owner Data directory Log file 8.3 main 5432 online postgres /var/lib/postgresql/8.3/main /var/log/postgresql/postgresql-8.3-main.log 8.4 main 5433 online postgres /var/lib/postgresql/8.4/main /var/log/postgresql/postgresql-8.4-main.log $ psql --cluster 8.4/main mydb