Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7mg3-006moH-S4 for pgsql-general@arkaria.postgresql.org; Tue, 28 Nov 2023 01:14:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r7mg1-001HUM-Pj for pgsql-general@arkaria.postgresql.org; Tue, 28 Nov 2023 01:14:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7mg0-001HU7-UY for pgsql-general@lists.postgresql.org; Tue, 28 Nov 2023 01:14:13 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7mft-007gvz-DN for pgsql-general@lists.postgresql.org; Tue, 28 Nov 2023 01:14:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9119B3200B32; Mon, 27 Nov 2023 20:14:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 27 Nov 2023 20:14:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1701134043; x=1701220443; bh=lHU3bLOjxu5vXsAOIHyQtIOnM4eFOopo2Wl 9ZChg7e0=; b=W4wUsoQG2d8VqMPkNl8b6x4a02JsgrJvR3tWZEnrK8XzibZrkMc jJlx7r4m1Vy393A4Pa+ljB8bz2oMNxe8dVOu37SRAWe0t32NME+qRLk1+RuxIKCN yMB2xzMadSUK5GjtWq35YUpwWKHgA2iTZ6sSdhSF9gDImbyMgtGjQdTQCLTxfgT0 YymvEXjyU9rzpV4M9nZaTLcGrK94LdhWFg9F14K88f1BNuIR5TFwAw5/xV3rETSa m1KQZK8D2cWEA3AU4V41rXMA5KcBlKfzD6aniliFgNbWnbPFtws/vXjxDEVZZkdT G1ZgZlRo+SGiihY0l9p8Rh0yyFfMzWOXrnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1701134043; x=1701220443; bh=lHU3bLOjxu5vXsAOIHyQtIOnM4eFOopo2Wl 9ZChg7e0=; b=bmCnM7VMziHJxMn6jF60rIybsv0cWMg7gxSI2JKmH+UN0zJDair P2w29qarb8koRG0d57PaNjyMh91IlIsErs5tbPvJttfds//u2T8SC/vx1M1B5Yzd JfEkTcj3nBiw31hJmbLOUQjzwMNDmVVrFH6sHnor2r1dacBhQeYgHwZvUoc6U1c+ H9ZB2AUwRUlCDOkCS7Wq+XpsUN4tt4JmC7haraov+EA6U4o4Z9gcF/QcW+a8UDDd YSUfan3GVztoV4jnDqTPItZmnk17/9fJeq2d2onqHlAK3l5Q4QSreIBau2jfGyGl Kn3AkwaNk/hZKp4SpvGTVrU8UJ+2FuyiuPA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeivddgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepfeegfeeiuedtgffgteeggfehkeejheetieeliefg teeikeejvdeiveeigfehvedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Nov 2023 20:14:02 -0500 (EST) Message-ID: <4a78e9e9-5d7f-4e7a-b3f4-0708161c1a1c@aklaver.com> Date: Mon, 27 Nov 2023 17:14:01 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: IPV6 issue Content-Language: en-US To: Atul Kumar Cc: Tom Lane , Ron Johnson , pgsql-general References: <4007721.1701117710@sss.pgh.pa.us> <11f1c399-34f6-4b2a-8869-2f5db9c59b89@aklaver.com> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/27/23 16:58, Atul Kumar wrote: > I Don't know how postgres was installed, 1) Someone installed it. Ask around on where it came from. 2) Query the package manager to see if it was installed that way? > > How do I check if I have more than one version of psql installed ? A quick and dirty way to see what you are using: whereis psql To find all the versions: sudo find / -name psql > > > Regards. > > On Tue, Nov 28, 2023 at 6:26 AM Adrian Klaver > wrote: > > On 11/27/23 16:42, Atul Kumar wrote: > > Hi, > > > > unix_socket_directories is set to default i.e. /tmp and I could > see the > > socket in /tmp directory. > > You have not answered: > >     How did you install Postgres? > >     Do you have more then one version of psql installed? > > > Though I am pretty sure I know the answer to the second question. > > > > > > > > Regards. > > > > > > > > > > On Tue, Nov 28, 2023 at 2:11 AM Tom Lane > > >> wrote: > > > >     Adrian Klaver > >      >> writes: > >      > On 11/27/23 12:11, Atul Kumar wrote: > >      >> I found that localhost was set to .bash_profile and when I > >     removed it > >      >> and then re-attempted to connected the database using "psql > >     postgres", I > >      >> got this new error: > >      >> > >      >> psql postgres -p 5432 > >      >> psql: error: 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"? > > > >      > Do you have more then one version of psql installed? > > > >     Yeah, that.  You're apparently using a version of psql/libpq that > >     thinks the default Unix socket location is /var/run/postgresql; > >     but the postmaster you are using did not create a socket there. > >     (Probably it put one in /tmp instead, which is the out-of-the-box > >     default location.  But some distros consider that insecure so > they > >     override it, typically to /var/run/postgresql/.) > > > >     The easiest workaround if you have a mishmash of Postgres > libraries > >     is to tell the postmaster to create sockets in both places. > >     See "unix_socket_directories" parameter. > > > >                              regards, tom lane > > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > -- Adrian Klaver adrian.klaver@aklaver.com