Search code examples
postgresqlpostgresql-9.3ubuntu-16.04postgresql-9.5

Upgrading from postgres-9.3 to postgres-9.5


I need to use the new jsonb field in postgres so I decided to upgrade to 9.5 in my ununtu 16.04 LTS. I followed this tutorial , but when it gets to the command pg_upgradecluster 9.3 main, I get the error that cluster configuration already exists. I checked other tutorials and found that I could get the list of clusters with pg_lsclusters. But the command always shows only the 9.3 cluster. Any attempt to create the 9.5 cluster always results to cluster configuration already exists. I purged the 9.5 and installed again multiple times but the same result. At last I decided to purge all the postgres installations I have after backing up my 9.3 cluster with pg_dumpall. Now I have decided to install the 9.5 freshly but I still get the same thing. When I install pg_lsclusters shows nothing and after starting postgres psql always returns psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? Right now I'm so tired and frustrated. Please if anyone has any possible solution or suggestion, help


Solution

  • The problem seemed to be from the version 9.5 in the postgres repositories. I installed 9.6 and everything worked like magic. Had I known there was a stable 9.6 earlier, I wouldn't have wasted 6 hours of my life in something I could have done for 10 minutes. Anyway, I'm happy I have have a working postgres with jsonb field