model-writtenrun 9054 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut proposed removing the historical use of IDENT_USERNAME_MAX in peer authentication, passing the username directly from the passwd structure to check_usermap() instead of copying it into a fixed-size buffer #1.
- Kyotaro Horiguchi pointed out that getpw*() returns static storage that later calls could overwrite, and requested documentation if the code relied on check_usermap() never making such calls #2.
- Tom Lane suggested using pstrdup() to preserve a separate copy without imposing the ident protocol's username limit #3.
- Peter considered requiring check_usermap() to avoid getpw*() calls because it only matches strings, and Tom accepted that alternative provided the assumption was documented #4 #5.
- Peter ultimately committed the cleanup with a dynamically allocated username copy and explicit cleanup, choosing consistency with other code in the file; the sole submitted patchset landed with these changes and no work remained pending in the thread #1 c5e1df951d #6.