Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: daflmx <daflmx(at)qq(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 2011-11-10 14:51:10
Message-ID: 7444.1320936670@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"=?ISO-8859-1?B?ZGFmbG14?=" <daflmx(at)qq(dot)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

In response to

  • at 2011-11-10 07:54:06 from daflmx

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Levan 2011-11-10 15:10:32 Fedora 16 note...
Previous Message shuaixf 2011-11-10 14:43:40 How to inquiry a nest result?