listening on tcp socket instead of unix domain - Mailing list pgsql-admin

From David Bear
Subject listening on tcp socket instead of unix domain
Date
Msg-id 20050625175849.GA18646@asu.edu
Whole thread Raw
Responses Re: listening on tcp socket instead of unix domain
List pgsql-admin
Hoping to get postgresql to listen on a tcp socket I made the
following change to postgresql.conf:

#listen_addresses = 'localhost' # what IP interface(s) to listen on;
listen_addresses = 'localhost'  # what IP interface(s) to listen on;
# defaults to localhost, '*' = any
#port = 5432
port = 5432

I understand this to mean, listen on localhost, ie 127.0.0.1.

However, a netstat -l tells me:

netstat -l | grep 5432
unix  2      [ ACC ]     STREAM     LISTENING     732094 /tmp/.s.PGSQL.5432

netstat -l | grep postg
tcp        0      0 localhost:postgresql    *:* LISTEN
tcp        0      0 localhost:postgresql    *:* LISTEN

This doesn't look right. Moreover, when attempting to create an ssh
tunnel to connect to postgres from a windows box, the connection
fails.

Is postgres really listening on a socket that is 'connect-able'
through ssh tunneling?  If so, then would using ssh command

 ssh -L 5432:remotehost:5432 user@remotehost

be sufficient to connect to the postgres running on remote host? This
fails when running psql on the machine with message:

> psql -p 5432
psql: could not connect to server: No such file or directory
...

So, I don't think something is quite working. Please advise.

--
David Bear
phone:     480-965-8257
fax:     480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump -Fc does not dump indexes]
Next
From: Tom Lane
Date:
Subject: Re: listening on tcp socket instead of unix domain