我在 ubuntu 12.04 中使用 postgres-xl。
当我尝试使用 createuser temp、psql postgres、createdb newdb 错误是
createdb: could not connect to database template1: 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"?
我的设置是
listen_addresses = 'localhost'
port = 9999
max_connections = 100
unix_socket_directory = '/usr/local/pgsql'
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections: 127.0.0.1/32
host all all 0.0.0.0/0 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication apple trust
#host replication apple 127.0.0.1/32 trust
#host replication apple ::1/128 trust