Connection refused
これでつながるけど、
$ psql database
これでエラーになるとき
$ psql -h 192.168.0.1 database connectDB() -- connect() failed: Connection refused Is the postmaster running (with -i) at '192.168.0.1' and accepting connections on TCP/IP port '5432'
postgresql.confのlisten_addressesが開放されているか確認しよう。。。