model-writtenrun 8160 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Georgios Kokolatos introduced work with Asim Praveen to prevent replace_string() from overflowing fixed buffers, offering StringInfo and heap-allocated alternatives while initially preserving the existing API; no current test failure had been reported #1.
- Alvaro Herrera preferred StringInfo, supported changing the API, and identified replacement markers split across fgets() buffer boundaries; discussion with Asim also established that replacement needed to copy only the suffix #2 #4 #5.
- Asim pursued the StringInfo alternative with complete-line reads through fgetln(), then replaced it with fgetc() after Alvaro questioned its portability #6 #7 #8.
- Georgios replaced character-by-character reading with repeated fgets() calls, changed replace_string() to accept StringInfo, and adapted ECPG callers; a subsequent revision fixed the compiler attribute that broke Windows builds #9 #10.
- After Alvaro suggested the newly available pg_get_line(), Tom Lane explained why callers needed a StringInfo-based interface and supplied pg_get_line_append(), reused it in hba.c and both regression drivers, removed ecpg_filter()'s line limit, and prevented replacement text from being searched again #11 #12.
- Tom committed the shared API portion of the final patch as 8e3c58e6e4, adding buffer termination on failure and an initdb conversion that avoided retaining oversized buffers for every input line #12.
- The regression portion of the same patch landed as 784b1ba1a2, differing only by a comment clarification and crediting Asim and Georgios as authors and Alvaro and Tom as reviewers #12.
- Tom's final message confirmed that he had reviewed and pushed the work, leaving the selected StringInfo solution fully landed with no outstanding revision requested #13.