Connection Issue - Mailing list pgsql-admin

From Kevin Kempter
Subject Connection Issue
Date
Msg-id 200906112119.16672.kevink@consistentstate.com
Whole thread Raw
Responses Re: Connection Issue  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-admin
Hi all;


I cannot connect to a postgres (8.3) cluster locally (via ssh onto the server).


The postgresql.conf file has this:


# - Connection Settings -


listen_addresses = '*'
#listen_addresses = '0.0.0.0' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction). You might
# also need to raise shared_buffers to support more connections.
#superuser_reserved_connections = 3 # (change requires restart)
unix_socket_directory = '/var/run/postgresql' # (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)




The pg_hba.conf has this:
local all postgres trust
local all postgres ident sameuser


# TYPE DATABASE USER CIDR-ADDRESS METHOD


# "local" is for Unix domain socket connections only
local all all ident sameuser
# IPv4 local connections:
host all postgres 127.0.0.1/32 trust
host all all 127.0.0.1/32 md5
hostssl all all 0.0.0.0/0 md5
host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::1/128 md5




I can ssh to a different host and connect via psql -h <host>


but if I'm on the postgres local server I get this:


$ psql -l
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?



Thoughts?


Thanks in advance



pgsql-admin by date:

Previous
From: Dave Youatt
Date:
Subject: Slony-I: cache lookup failed for type 267501
Next
From: Fujii Masao
Date:
Subject: Re: Connection Issue