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.96) (envelope-from ) id 1vjJCV-00Ci70-22 for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Jan 2026 15:35:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vjJCT-000GY0-2w for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Jan 2026 15:35:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vjJCT-000GXo-24 for pgsql-bugs@lists.postgresql.org; Fri, 23 Jan 2026 15:35:53 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vjJCN-0000000063r-3G0D for pgsql-bugs@lists.postgresql.org; Fri, 23 Jan 2026 15:35:53 +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 60NFZjlv3106879; Fri, 23 Jan 2026 10:35:45 -0500 From: Tom Lane To: gc.nugent66@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19388: Failing to connect to postgres with EACCES error In-reply-to: <19388-c49c361739e2eb3c@postgresql.org> References: <19388-c49c361739e2eb3c@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 23 Jan 2026 13:37:08 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3106877.1769182545.1@sss.pgh.pa.us> Date: Fri, 23 Jan 2026 10:35:45 -0500 Message-ID: <3106878.1769182545@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > Running on k8s pods, I have an issue where a process cannot connect to an > Azure Postgres server due to a permission error. > ... > We use standard SSL without client certificates and the running process is > setup without a homedir for security reasons. I'm pretty skeptical that that is a good idea, but if you are stubborn about it you could explicitly specify "sslcert=/no/such/file" and so on in your connection parameters. Another way is to make the HOME environment variable point at a directory that actually doesn't exist, rather than one that has access restrictions. > I noticed from the postgres source code that only ENOENT & ENOTDIR are > allowable errors but EACCES is a fail condition. > I understand the reasoning for checking for existence of certificates, but > can the Permission Denied error also be treated as "Can't get client certs, > continue to try to connect without"? No, I don't think that would be an improvement in user experience for most people. If your cert isn't working and libpq fails to tell you why not, debugging that could be pretty unpleasant. If anything, I'd lean towards removing the special exception for ENOTDIR ... I wonder why that's there. regards, tom lane