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 1j2Z3G-0003sC-EV for pgsql-admin@arkaria.postgresql.org; Fri, 14 Feb 2020 11:22:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j2Z3E-0003Nz-Ty for pgsql-admin@arkaria.postgresql.org; Fri, 14 Feb 2020 11:22:28 +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 1j2Z3E-0003Nm-Bc for pgsql-admin@lists.postgresql.org; Fri, 14 Feb 2020 11:22:28 +0000 Received: from sonic304-24.consmr.mail.gq1.yahoo.com ([98.137.68.205]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j2Z3B-00054d-FN for pgsql-admin@postgresql.org; Fri, 14 Feb 2020 11:22:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1581679343; bh=zHCXVVUlDYWx2i/fiaYb9oYbI+QZGkGj2wTa+poVXFY=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From:Subject; b=uMYxYJSs96dSpcUQQiLQ1JAGywTwtrpxmyGKyw18LSxyTj+StEBmFKSv5ozS2Ri24iF9Ot4LP6u76LZFh5CMMUfgfD3S/XYWFKyj7YMMjer186OQQElLOj4rYYGoM1fszlYnxiVzzktBxImLWKrU3OlsEtdCrsg4/X5EIsmmr/uokANMKPJcEvPm/eZe68txCI9svn2XoFSP59a/SOEWzfKiGq2vnRQm6GhZ6CPVHvJ5RnnTwbPTfwkyg3dnIanpxjgv8crBnxNXqVdf6NpjS2NG/Wu4BA+4Av1FZFagG+addTkZ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VbZqcFAQtvTygOUAXhr1JtcHXf18qsxX8MRwP KZghZDfauyG4JAkHrTom0IUtX2YXXJWVAQ4vA5R7BQZpnfanGMCrjetw.TjQmLgsKZri1rSWaPMR 3AxONzdZ0ByV7Zd7nOhCXDxOPvBe1D11lQhYxXvjrhW.QF8yYO40u9tPpX4AOQPb4tSt5fhzaUbR xQycfoqkd0SAw_M6D6xpM71PkbSOA6SUhBTZJi4BseNksI3.OKIxj9BTsSQ640J3ATltc5tfdITn e83HIcz3R_PvcCQG1nTdpj4.d2oDx_gMV5ZomT4rIGjGJLdWFSAkkyvO_Y3Hq4vOP3.xJQBNWbRx gV4LMJ0GLHa3uX6lwsb5tnC04clXKuGKgIwX6.sSvFEczsssIj6.MX2qFWcs2wcHgYcBnfh_N94m SlyAU7HE4eoJ7X2kJ7pmNQbTbKJjdeOwrr1fFCXZCnGhfiLlcvlEIv06rNv4mlpOo_jQ- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Fri, 14 Feb 2020 11:22:23 +0000 Received: by smtp431.mail.sg3.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 099fb24cac5f776b7921ad9e1c99f457; Fri, 14 Feb 2020 11:22:19 +0000 (UTC) Content-Type: multipart/alternative; boundary=Apple-Mail-59831526-73F9-48DF-9A70-6777043686F0 Content-Transfer-Encoding: 7bit From: abbas alizadeh Mime-Version: 1.0 (1.0) Subject: Re: could not connect via psql to 9.4 version Date: Fri, 14 Feb 2020 19:22:17 +0800 Message-Id: References: Cc: Murali Paramu , pgsql-admin In-Reply-To: To: Jeff Janes X-Mailer: iPhone Mail (17D50) Content-Length: 3735 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-59831526-73F9-48DF-9A70-6777043686F0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi. You should use the right psql for version 9.4. In linux run =E2=80=9Cwhich psql=E2=80=9D to see which version is used to co= nnect Sent from my iPhone > On Feb 14, 2020, at 01:11, Jeff Janes wrote: >=20 > =EF=BB=BF >> On Thu, Feb 13, 2020 at 11:23 AM Murali Paramu wrote= : >=20 >> 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 >>=20 >> 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"? >>=20 >=20 > 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. >=20 > Cheers, >=20 > Jeff=20 --Apple-Mail-59831526-73F9-48DF-9A70-6777043686F0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi.
You should use the right psql for v= ersion 9.4.
In linux run =E2=80=9Cwhich psql=E2=80=9D to see which= version is used to connect

Sent from my iPhone

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

=EF=BB=BF
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 pgAd= min.
But through psql I c= an 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 s= erver: No such file or directory
Is the server running locally and a= ccepting
connections on Unix domain socket "/var/run/postgresql/.s.P= GSQL.5432"?



Perhaps 9.4 is configu= red 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 
=
= --Apple-Mail-59831526-73F9-48DF-9A70-6777043686F0--