I have recently upgraded from Debian 7 to Debian 8 and from PostgreSQL 9.1 to 9.4. I am not able to connect to my database server even from pgAdmin III on localhost.

I have in my postgresql.conf the port as 5433 and the listen_address as "*".

In pg_hba.conf, I have the following lines: host all all md5 host all all ::1/128 md5

Nonetheless, I get the following error when I try to connect:

enter image description here

What configuration have I not yet configured? I believe I went through the same procedure in the config files as when I set up in 9.1, but it is not working.

  • What says netstat -anp | grep 5433 ? – krisFR May 15 '15 at 20:35
  • @krisFR no output – Jake May 15 '15 at 20:36
  • So what says netstat -anp | grep -i postgre ? – krisFR May 15 '15 at 20:38
  • No output. I made sure it was started first too. – Jake May 15 '15 at 20:53
  • 1
    It is not started. – krisFR May 15 '15 at 20:53

The message you highlighted on the screenshot clearly states that the server did not start. Your pg_hba.conf looks syntactically correct, so I doubt it is the issue. You need to examine the logs. Most probably you forgot to perform the upgrade and the server refuses to start upon detecting old data format.

You should check the logs for something like the following:

Sep 02 18:11:03 localhost.localdomain postgresql-check-db-dir[30673]: An old version of the database format was found.
Sep 02 18:11:03 localhost.localdomain postgresql-check-db-dir[30673]: Use "postgresql-setup --upgrade" to upgrade to version 9.4.

If this is indeed the case then you need to run:

postgresql-setup --upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.