Re: could not connect via psql to 9.4 version - Mailing list pgsql-admin

From abbas alizadeh
Subject Re: could not connect via psql to 9.4 version
Date
Msg-id C2947FC7-53C7-496D-8A19-C6A343CDFB78@yahoo.com
Whole thread Raw
In response to Re: could not connect via psql to 9.4 version  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: could not connect via psql to 9.4 version
List pgsql-admin
Hi.
You should use the right psql for version 9.4.
In linux run “which psql” to see which version is used to connect

Sent from my iPhone

On Feb 14, 2020, at 01:11, Jeff Janes <jeff.janes@gmail.com> wrote:


On Thu, Feb 13, 2020 at 11:23 AM Murali Paramu <ipmurali@gmail.com> 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 5432
psql: 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 

pgsql-admin by date:

Previous
From: Rahul Saha
Date:
Subject: Re: MULTI MASTER IMPLEMENTATION
Next
From: Jeff Janes
Date:
Subject: Re: creative work-arounds to obtain auto_explain's benefits for non-superuser