Re: thread-safety: getpwuid_r()

2024-09-02 Thread Peter Eisentraut
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

Re: thread-safety: getpwuid_r()

2024-08-26 Thread Heikki Linnakangas
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() a

Re: thread-safety: getpwuid_r()

2024-08-26 Thread Peter Eisentraut
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. Ye

Re: thread-safety: getpwuid_r()

2024-08-24 Thread Heikki Linnakangas
On 24/08/2024 11:42, Peter Eisentraut wrote: Here is a patch to replace a getpwuid() call in the backend, for thread-safety. This is AFAICT the only call in the getpw*() family that needs to be dealt with. (There is also a getgrnam() call, but that is called very early in the postmaster, before