Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

From: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Anders Kaseorg <andersk(at)mit(dot)edu>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, alvherre(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
Date: 2022-01-09 21:51:37
Message-ID: YdtY6Xd1tkDEuV+7@elch.exwg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

## Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-01-09 22:40:08 Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
Previous Message Zhihong Yu 2022-01-09 21:27:27 Re: null iv parameter passed to combo_init()