model-writtenrun 3052 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut proposed making backend peer authentication thread-safe by replacing getpwuid() with pg_get_user_name(); he left getgrnam() unchanged because it runs early in the postmaster before multiprocessing #1.
- Heikki Linnakangas supported the patch but identified potential buffer truncation and suggested removing the thin user-name and home-directory wrappers in favor of direct getpwuid_r() calls #2.
- Peter adopted that approach, removing src/port/user.c and updating its callers to handle errors directly; he chose 1024-byte buffers after finding that sysconf(_SC_GETPW_R_SIZE_MAX) did not work on FreeBSD #3.
- Heikki approved the revised patch and suggested adding a brief explanation of the buffer-size choice #4.
- Peter committed the revised patch with an unchanged diff and an expanded commit message explaining the buffer choice 4d5111b3f1, then confirmed completion in the thread's final message #5.