model-writtenrun 1042 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andreas Karlsson proposed calling ICU's UTF-8 case-conversion APIs directly to avoid UChar conversions, reporting a 15–20% speedup and attaching a separate non-UTF-8 cleanup patch in #1.
- Jeff Davis recommended caching UCaseMap in pg_locale_t and sharing the old-ICU normalization of the root locale name in #2.
- The work stalled with unanswered feedback and a linker failure involving strfold_icu reported in #4, and was returned with feedback in #5.
- Andreas revived the work after roughly a year in #6, combining the cleanup with the optimization, caching UCaseMap, handling case folding and old ICU versions, and reporting performance faster than glibc in his benchmark.
- zengman tested the revised implementation and suggested clearer diagnostics and a comment correction in #7, which Andreas incorporated in #8.
- Andreas introduced separate UTF-8 method-table entries in #9, and zengman's follow-up suggestions in #10 led to error-check ordering and spelling changes in #11.
- Jeff committed #11 as c4ff35f104, with additional locale-helper changes, a corrected UTF-8 identifier-downcasing method entry, and cleanup, announcing completion in #12.
- Alexander Lakhin reported an AddressSanitizer stack-buffer-overflow triggered by creating an ICU collation in #13; Andreas traced it to an unterminated language buffer and proposed enlarging that buffer in #14, preferring this over a bounded comparison or warning check.
- Jeff committed the buffer enlargement from #14 as 06ce97b999, also checking U_STRING_NOT_TERMINATED_WARNING and backpatching through PostgreSQL 18, as explained in #16.
- Andreas extended the warning checks to two initdb call sites in #17 and corrected an operator typo in #18; Jeff committed that corrected patch unchanged apart from rebasing as 8167371704, backpatched through PostgreSQL 16, and confirmed completion in #19.
- All attached work had landed by #19, while Andreas's broader question in #17 about similar risks in other ICU functions remained unanswered.