Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYdRp-0004xC-1O for pgsql-docs@arkaria.postgresql.org; Fri, 30 Oct 2020 23:04:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYdRn-00008I-QM for pgsql-docs@arkaria.postgresql.org; Fri, 30 Oct 2020 23:04:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYdRn-00008B-Ky for pgsql-docs@lists.postgresql.org; Fri, 30 Oct 2020 23:04:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYdRl-0005nA-Iw for pgsql-docs@lists.postgresql.org; Fri, 30 Oct 2020 23:04:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09UN4Tgr144188; Fri, 30 Oct 2020 19:04:29 -0400 From: Tom Lane To: c.santos@asctechnologies.com cc: pgsql-docs@lists.postgresql.org Subject: Re: 127.0.0.1 or localhost In-reply-to: <160408279022.7809.11205153599276240373@wrigleys.postgresql.org> References: <160408279022.7809.11205153599276240373@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Fri, 30 Oct 2020 18:33:10 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <144186.1604099069.1@sss.pgh.pa.us> Date: Fri, 30 Oct 2020 19:04:29 -0400 Message-ID: <144187.1604099069@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Doc comments form writes: > It's not actually a problem, it's a question. pgpass in my case, has two > lines, one with 127.0.0.1 and another with localhost > what would be the difference from one to another. ?? AFAIR, the field is matched to how you wrote the hostname in the connection parameters. Also, it looks like there's a special case to consider 'localhost' as matching a Unix-socket connection, if the socket is in the installation's default socket directory. regards, tom lane