On Thu, Jul 10, 2025 at 5:10 PM Steve Lau <stevel...@outlook.com> wrote:
> Hi hackers, when reading the source code, I noticed that Postgres is still 
> using getpwuid(), which is not thread-safe since it returns a pointer to the 
> static memory that can be overwritten by concurrent calls. Then I searched 
> "getpwuid" in the mailing list[1], and there was a committed patch that 
> refactored one such usage. So maybe we can clean up the remaining getpwuid() 
> calls?

+1, we should.

> Then I realized that Postgres does not use threads but processes, so 
> technically IMHO getpwuid() is safe to Postgres? But that patch mentioned 
> that[2]:

We would like to use threads, and many things like this are being
changed currently.


Reply via email to