pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: SAMMY CRISWELL <Sammy_R_Criswell@raytheon.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Psql: could not connect to server: No such file or directory
Date: Thu, 02 May 2019 13:07:44 -0400
Message-ID: <2606.1556816864@sss.pgh.pa.us> (raw)
In-Reply-To: <363d3b8ca13a408c81d584a28d29da8e@BN1F00802MB0033.008f.mgd2.msft.net>
References: <363d3b8ca13a408c81d584a28d29da8e@BN1F00802MB0033.008f.mgd2.msft.net>

SAMMY CRISWELL <Sammy_R_Criswell@raytheon.com> writes:
> I am preparing to upgrade my pqsl server from 9.3.5 to 9.6.12. I have installed the 9.6 rpm onto the server that has 9.3.5 running. Postgres is still running 9.3.5 on that server, but when I try to run psql I get the following message.

> "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 database is still running and working I just can't use any of the client commands like psql, pg_dump....
> And there is no "/var/run/postgresql/.s.PGSQL.5432" file.

What you've probably run into here is that some packagers build Postgres
to put the server's socket file into /tmp, while others build it to put
the socket into /var/run/postgresql/ or some similar path.  Likely,
you are now using a new version of libpq.so that expects the latter
while your server is still doing the former.  You can override libpq's
default with "-h /tmp" or equivalent in order to connect.

			regards, tom lane





view thread (7+ messages)  latest in thread

Message-ID: <2606.1556816864@sss.pgh.pa.us>
Permalink:  ../2606.1556816864@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2606.1556816864@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Sammy_R_Criswell@raytheon.com
  Subject: Re: Psql: could not connect to server: No such file or directory
  In-Reply-To: <2606.1556816864@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox