Re: - Mailing list pgsql-general

From Tom Lane
Subject Re:
Date
Msg-id 7444.1320936670@sss.pgh.pa.us
Whole thread Raw
In response to  ("daflmx" <daflmx@qq.com>)
List pgsql-general
"=?ISO-8859-1?B?ZGFmbG14?=" <daflmx@qq.com> writes:
> [ server is running but ]
>  $/usr/local/pgsql/bin/createdb mydb
>  createdb:could nto connect to database postgres: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"?

That last line shows that psql (or more specifically, the libpq.so
shared library) thinks it should connect to a local socket file at
/var/run/postgresql/.s.PGSQL.5432.  However, the common location
for Postgres' local socket file is /tmp/.s.PGSQL.5432.  I suspect
if you look in /tmp, you'll find that the server did create a
socket file there.

In short: this problem occurs because you have a postmaster built one
way and a client library built for a different convention.  You could
force things with the -h switch to psql, but it would be more convenient
to be using postmaster and client library from the same distribution.

            regards, tom lane

pgsql-general by date:

Previous
From: David Johnston
Date:
Subject: Re: plpgsql, I have a solution, want to see if there is a cleaner/better one. Taking vertical list and comma separating it onto a row
Next
From: Jerry Levan
Date:
Subject: Fedora 16 note...