model-writtenrun 9329 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jorge Gustavo Rocha reported that service-file connections failed through psycopg2 on Windows while psql worked, and Tom Lane suspected an unremoved carriage return and suggested trimming trailing whitespace #1 #2.
- Jorge supplied a patch stripping trailing carriage returns from parseServiceFile(), then identified the underlying cause: QGIS changed the default file-opening mode to binary, disabling the expected Windows newline conversion #6 #10.
- Tom proposed explicitly opening the file in text mode as a minimal alternative, which Jorge tested successfully, but Tom preferred broader whitespace handling and a consistent project-wide approach #11 #12.
- Michael Paquier proposed following passwordFromFile() instead of backporting changes to the fopen wrapper, posted a revised CR/LF-stripping patch, and received successful Ubuntu and Windows test results from Jorge #13 #14 #15.
- Tom expanded the work into two patches: parseServiceFile() would strip all trailing whitespace, and other newline-trimming sites would consistently loop over trailing CR and LF characters, including when a buffer boundary separated them #17 #18.
- Michael questioned changes to pg_resetwal and the handling of literal carriage returns in passwords; Tom defended uniform trimming to avoid inconsistent copied code and handle split CR/LF sequences #19 #20.
- Tom committed both patches from #18 unchanged as b654714f9b, crediting himself and Michael; backports used narrower service-file handling and included the SSL passphrase correction where applicable #21.
- The fixes had landed by the thread's end, when Michael proposed a shared CR/LF-stripping helper as a possible follow-up without supplying another patch #23.