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 1n6g6P-0007IZ-Ln for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Jan 2022 21:51:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n6g6M-0005kv-Vk for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Jan 2022 21:51:46 +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 1n6g6M-0005kl-Mc for pgsql-hackers@lists.postgresql.org; Sun, 09 Jan 2022 21:51:46 +0000 Received: from smtp.burggraben.net ([88.198.69.140]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6g6F-00089k-Pv for pgsql-hackers@lists.postgresql.org; Sun, 09 Jan 2022 21:51:46 +0000 Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7120:1:127b:44ff:fe4f:148d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "elch.exwg.net", Issuer "R3" (not verified)) by smtp.burggraben.net (Postfix) with ESMTPS id 0D532C00316; Sun, 9 Jan 2022 22:51:38 +0100 (CET) Received: by elch.exwg.net (Postfix, from userid 1000) id 96B7C3AB02; Sun, 9 Jan 2022 22:51:37 +0100 (CET) Date: Sun, 9 Jan 2022 22:51:37 +0100 From: Christoph Moench-Tegeder To: Tom Lane 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 Message-ID: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1769427.1641754742@sss.pgh.pa.us> User-Agent: Mutt/2.1.5 (2021-12-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ## Tom Lane (tgl@sss.pgh.pa.us): > Given the POSIX requirements, it's basically impossible to believe > that there are interesting cases where $HOME isn't set. When I look at a random Debian with the usual PGDG packages, the postmaster process (and every backend) has a rather minimal environment without HOME. When I remember the code correctly, walreceiver uses the functions from fe-connect.c and may need to find the service file, a password file or certificates. If I'm correct with that, requiring HOME to be set would be a significant change for existing "normal" installations. What about containers and similar "reduced" environments? Regards, Christoph -- Spare Space