From: Tom Lane <tgl@sss.pgh.pa.us>
To: Murthy Nunna <mnunna@fnal.gov>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Postgres v9.5.3 and v9.5.4 Unix Socket Issue
Date: Sat, 13 Aug 2016 11:39:58 -0400
Message-ID: <32431.1471102798@sss.pgh.pa.us> (raw)
In-Reply-To: <CY1PR09MB109934F368C846AA07D29AC9B8100@CY1PR09MB1099.namprd09.prod.outlook.com>
References: <CY1PR09MB109934F368C846AA07D29AC9B8100@CY1PR09MB1099.namprd09.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Murthy Nunna <mnunna@fnal.gov> writes:
> We downloaded and installed postgres from rpm(s). The installation is on Linux-x64.
> We did pg_upgrade of an existing 9.5.3 cluster.
> psql -U postgres -d template1 -p 5434
> 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.5434"?
> The socket is in /tmp and that is where it is supposed to be.
It looks to me like you have a copy of libpq that was built to think that
the default socket location is in /var/run/postgresql not /tmp. That (or
some close variant) is a change that many Linux packagers make because
they worry that /tmp isn't secure enough. So what seems likely is that
even if you are using the copy of psql that came from the PGDG RPMs
(a fact you have not proven), it is linking to a libpq.so that came from
your Linux distro vendor. "ldd" would help you track down which shared
libraries psql is picking up, but I'll bet it's finding libpq.so in
/usr/lib or /usr/lib64 rather than wherever the PGDG RPMs installed it.
There should be documentation material in the RPMs about how to get psql
to find the right libpq. In the extreme you could set LD_LIBRARY_PATH
all the time, but there may be an easier way. I've been out of the
Linux-packaging game for a little while so I don't remember all the
tricks.
Another alternative worth considering is to go ahead and make the server
create a socket in /var/run/postgresql in addition to /tmp.
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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, mnunna@fnal.gov
Subject: Re: Postgres v9.5.3 and v9.5.4 Unix Socket Issue
In-Reply-To: <32431.1471102798@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