Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j2IDr-0008I9-W9 for pgsql-admin@arkaria.postgresql.org; Thu, 13 Feb 2020 17:24:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j2IDq-000666-Nv for pgsql-admin@arkaria.postgresql.org; Thu, 13 Feb 2020 17:24:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j2IDp-00065y-Qk for pgsql-admin@lists.postgresql.org; Thu, 13 Feb 2020 17:24:18 +0000 Received: from smtp2a.hushmail.com ([65.39.178.237] helo=smtp2.hushmail.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j2IDm-0005B6-BL for pgsql-admin@postgresql.org; Thu, 13 Feb 2020 17:24:15 +0000 Received: from smtp2.hushmail.com (localhost [127.0.0.1]) by smtp2.hushmail.com (Postfix) with SMTP id 01B32A0475 for ; Thu, 13 Feb 2020 17:24:12 +0000 (UTC) X-hush-tls-connected: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=hushmail.com; h=date:to:subject:from; s=hush; bh=pzmDgXnsyG5mhzLzcCHIPm5vb4hIw/ZGmc+UrQ9dDw0=; b=IYIjLfb5lw9hO/seZC17dlTZ3H0d7IQYpVSCcHr0Z7LMBdW/Vk9JDPuLBm3nbaFSjaKuJpsB95r6t9hR46zAr6X8jJiZim8dcpNtQp4KbaaHIHfBH76gUVqj/MfrZD7/SK6/k3wjgPIJZGNjDE+bNNSeEqoBfXcY2K/EE8CB/7Uuf0mStdysCtmPPNaJMNF3FJcdi9Jvx+aN+mb79Dad25BddhmUODTNy4x/OAem7z3Z1SlVPOZ6VUxvKFQ7zJmqKurpHoGJ3F8VnOEe/CJUqieaDsqFyejMtXVeWs3dbmtvXUbSn3Obzyg3ihxtOsybQsRpo6InRjkg/PTtqnCZlA== Received: from smtp.hushmail.com (w9.hushmail.com [65.39.178.29]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp2.hushmail.com (Postfix) with ESMTPS; Thu, 13 Feb 2020 17:24:11 +0000 (UTC) Received: by smtp.hushmail.com (Postfix, from userid 99) id 0BB2F20118; Thu, 13 Feb 2020 17:24:11 +0000 (UTC) MIME-Version: 1.0 Date: Thu, 13 Feb 2020 17:24:10 +0000 To: "Murali Paramu" Cc: "pgsql-admin" Subject: Re: could not connect via psql to 9.4 version From: zurich@nym.hush.com In-Reply-To: References: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="UTF-8" Message-Id: <20200213172411.0BB2F20118@smtp.hushmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Have you checked the local settings in the pg_hba.conf as this will affect permitted access. You can compare what is set differently between the different versions of postgreSQL. Cheers Peter On 2/13/2020 at 5:11 PM, "Jeff Janes" wrote: > >On Thu, Feb 13, 2020 at 11:23 AM Murali Paramu > wrote: > >> Hello Team, >> I have two versions of PostgreSQL 9.4 and 12.1 >> both servers can be connected through pgAdmin. >> But through psql I can connect only to 12.1 >> >> when i connect to 9.4 got below error: >> >> >> >> >> *$ psql -U postgres -p 5432psql: error: could not connect to >server: 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"?* >> >> >Perhaps 9.4 is configured to put its socket file in /tmp instead of >/var/run/postgresql/. You can try -h /tmp, or you can just always >use -h >127.0.0.1, then you don't need to worry where the socket file is. > >Cheers, > >Jeff