So I had PostgreSQL working in Ubuntu 11.04 using 8.4(?), however, when I upgraded it also upgraded PostgreSQL to 9.1 and now I can't connect using JDBC.

I added the following to my pg_hba.conf

host    all             all             127.0.0.1/32            trust
host    all             all             0.0.0.0/0               trust

and the following to my postgres.conf...

listen_addresses = '*'

but I get the following connecting with SQuirrel

My Local PostgresSQL: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

Works fine when using psql

Any ideas?

ANSWER: Per this site the default port is 5432, however, per the postgres.conf file that came installed by default the port is set to 5433...

port = 5433

So if someone else has this problem try the new port.

link|improve this question
This question appears to be abandoned and unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! – Jorge Castro Feb 27 at 22:39
feedback

closed as not a real question by Bruno Pereira Mar 12 at 9:54

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. See the FAQ for guidance on how to improve it.

1 Answer

I'm not sure, but it might be possible that since the upgrade you have both 8.x version and 9.x versions installed. So, whence you upgraded, the installation decided to use port 5433 since 5432 was already used.

link|improve this answer
feedback

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