möglicherweise unterschiedliche Kombinationen zwischen PG-Server und libpq. Ich zitiere mal aus einer heutigen Mail von Tom Lane:
Ah, this is a symptom we’ve seen before. There is disagreement about
where the postmaster ought to put its socket file — traditionally
PG puts it in /tmp/, but some people feel that’s a security hazard and
want to put it in a bespoke directory such as /var/run/postgresql/.
It appears from these symptoms that (a) you are running a server that
puts the socket in /tmp (probably you got that server from a PGDG RPM?)
but (b) you are trying to connect to it using a Red-Hat-provided libpq
(which defaults to expecting the file to be in /var/run/postgresql/).
You have various possible workarounds:
tell the server to create a socket file in /var/run/postgresql/ too
tell libpq where to find the socket, e.g. with “psql -h /tmp”;
tell libpq not to use a Unix socket at all, e.g. “psql -h localhost”;
make sure to invoke psql+libpq from the PGDG distribution rather than
using ones supplied by Red Hat.
Generally speaking, mixing PGDG RPMs with vendor-supplied Postgres RPMs
is a recipe for headaches. If you can drop the Red Hat Postgres RPMs
without causing dependency problems, do that. Otherwise, the
two-socket-files solution is probably the best.
regards, tom lane