Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzptR-0000qu-Ul for pgsql-admin@arkaria.postgresql.org; Wed, 04 Oct 2017 20:03:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dzptR-00063B-BW for pgsql-admin@arkaria.postgresql.org; Wed, 04 Oct 2017 20:03:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dzptQ-00062Q-Hf for pgsql-admin@postgresql.org; Wed, 04 Oct 2017 20:03:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dzptN-0004El-Rm for pgsql-admin@postgresql.org; Wed, 04 Oct 2017 20:03:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v94K3etZ021117; Wed, 4 Oct 2017 16:03:40 -0400 From: Tom Lane To: Don Seiler cc: pgsql-admin Subject: Re: psql can't connect to old DB after installing new binaries In-reply-to: References: Comments: In-reply-to Don Seiler message dated "Wed, 04 Oct 2017 14:26:15 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21115.1507147420.1@sss.pgh.pa.us> Date: Wed, 04 Oct 2017 16:03:40 -0400 Message-ID: <21116.1507147420@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Don Seiler writes: > However, after installing the 9.6 binaries, psql complains about the socket > file: > 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"? > My postgres 9.2 database has a socket file in /tmp/.s.PGSQL.5432. Yeah, I think Devrim switched the default socket location from /tmp to /var/run/postgresql to conform to what the Red Hat build does. > What's interesting is that I get this error even when running the 9.2 > psql as well: I believe that the client-side default for this is embedded in libpq.so. Probably the way things are set up, the 9.2 psql uses the 9.6 libpq.so if it's installed. That would tend to happen if the libpq.so is being picked up from /usr/lib(64) rather than a version-specific directory ("ldd" would help you check that). Since at least 9.3, it's been possible to configure the server to create more than one socket file (see unix_socket_directories). Recommended practice when you're dealing with multiple client builds is to create sockets in both places. 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