[GENERAL] psql - looking in wrong place for socket - Mailing list pgsql-general

From Steve Clark
Subject [GENERAL] psql - looking in wrong place for socket
Date
Msg-id 481feb63-cfa7-7125-0911-01d72399b854@netwolves.com
Whole thread Raw
Responses Re: [GENERAL] psql - looking in wrong place for socket  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hi List,

I am running postgresql 8.4.20 on CentOS 6. Things have been running fine for a long time
then I rebooted. Postgres came up but when I tried to connect with psql on the local machine
I got

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

The socket is actually being created (and always has been) in /tmp

I worked around the problem temporarily by
ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432

What controls where psql looks for the socket?

Thanks,
Steve




pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] pg_dump pg_restore hanging in CentOS for large data
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] psql - looking in wrong place for socket