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 1n6hQj-000208-V8 for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Jan 2022 23:16:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n6hQi-0007m8-HY for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Jan 2022 23:16:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6hQi-0007j2-8P for pgsql-hackers@lists.postgresql.org; Sun, 09 Jan 2022 23:16:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6hQf-0006dp-Tt for pgsql-hackers@lists.postgresql.org; Sun, 09 Jan 2022 23:16:51 +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 209NGh7S1899016; Sun, 9 Jan 2022 18:16:43 -0500 From: Tom Lane To: Christoph Moench-Tegeder cc: Anders Kaseorg , Daniel Gustafsson , Kyotaro Horiguchi , alvherre@alvh.no-ip.org, pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory In-reply-to: References: <202110182223.zeze33l55qa5@alvherre.pgsql> <20211019.173422.706584612464055211.horikyota.ntt@gmail.com> <5d675cbe-7837-e9ae-961d-be7d03201f3b@mit.edu> <20211020.144014.580443822870543857.horikyota.ntt@gmail.com> <07CA67A0-A46C-4ED5-99C6-24D41BDDC8CA@yesql.se> <1769427.1641754742@sss.pgh.pa.us> <1888214.1641768008@sss.pgh.pa.us> Comments: In-reply-to Christoph Moench-Tegeder message dated "Mon, 10 Jan 2022 00:11:59 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1899014.1641770203.1@sss.pgh.pa.us> Date: Sun, 09 Jan 2022 18:16:43 -0500 Message-ID: <1899015.1641770203@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Christoph Moench-Tegeder writes: > ## Tom Lane (tgl@sss.pgh.pa.us): >> Isn't that a flat out violation of POSIX 8.3 Other Environment Variables? > After poking around across some Linuxes, it looks like people silently > agreed that "services" are not logged-in users: among the daemons, > having HOME set (as observed in /proc/*/environ) is an exception, > not the norm. Meh. I guess there's not much point in arguing with facts on the ground. Anders' proposed behavior seems like the way to go then, at least so far as libpq is concerned. (I remain skeptical that psql would be run in such an environment, but there's no value in making it act different from libpq.) regards, tom lane