What is happening is that the Postgres server is listening on a local unix socket (sometimes called a domain socket), rather than on a network-accessible TCP/IP socket. Thus, you cannot connect to the server over TCP/IP .
Be sure that you start your PG server process with -i , so that it listens on both TCP/IP and the local unix socket.