model-writtenrun 6228 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Hans Buschmann reported potentially expensive per-byte destination-buffer checks in PostgreSQL 14 hex encoding and proposed checking the required output size once before the loop #1.
- Ranier Vilela extended that approach to decoding and changed length types to size_t #2; Hans then identified incorrect decoding diagnostics and suggested moving the odd-digit check outside the loop #3, which Ranier included experimentally while reporting string regression-test failures #4.
- Michael Paquier measured approximately 1600 ms with the existing code, 1550 ms with the latest optimization, and 1450 ms after reverting the refactoring, so he proposed a combined revert restoring the previous backend implementation rather than continuing the optimization after beta3 #5.
- Michael explained that src/common/base64.c serves authentication and SCRAM, where safe buffer handling matters and the paths are less performance-sensitive #6; Ranier confirmed he had no plans to modify that file #7.
- Tom Lane supported the revert but requested a commit message explaining its rationale #8; Bruce Momjian and Julien Rouhaud also exposed incorrect commit references in Michael's accompanying email, which Michael corrected #9 #10 #11.
- Michael explained that the performance regression required reverting the main refactoring, its dependent cleanup then became unnecessary, and retaining the earlier common-code extraction would leave inadequate output-buffer protection #12.
- The revert from #5 landed with identical code and an expanded explanatory commit message as 2576dcfb76, with backpatching through PostgreSQL 14; Michael confirmed completion in the final message #13, leaving the proposed loop and type changes superseded.