From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: thread-safety: getpwuid_r() |
Date: | 2024-09-02 07:28:21 |
Message-ID: | 4d806bcc-0f57-4410-9f28-a19a3f1ecfd6@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 26.08.24 19:54, Heikki Linnakangas wrote:
> On 26/08/2024 20:38, Peter Eisentraut wrote:
>> On 24.08.24 15:55, Heikki Linnakangas wrote:
>>> Come to think of it, the pg_get_user_name() function is just a thin
>>> wrapper around getpwuid_r(). It doesn't provide a lot of value.
>>> Perhaps we should remove pg_get_user_name() and
>>> pg_get_user_home_dir() altogether and call getpwuid_r() directly.
>>
>> Yeah, that seems better. These functions are somewhat strangely
>> designed and as you described have faulty error handling. By calling
>> getpwuid_r() directly, we can handle the errors better and the code
>> becomes more transparent. (There used to be a lot more interesting
>> portability complications in that file, but those are long gone.)
>
> New patch looks good to me, thanks!
committed
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2024-09-02 08:03:14 | Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~? |
Previous Message | Amit Kapila | 2024-09-02 06:55:35 | Re: Introduce XID age and inactive timeout based replication slot invalidation |