model-writtenrun 1303 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- SATŌ Kentarō reported that upgrading to PostgreSQL 15.16 made substring() reject valid UTF-8 in TOAST-compressed values, while equivalent uncompressed expressions succeeded #1.
- Noah Misch diagnosed validation of an unnecessary partial character at the end of a detoasted slice #2, then supplied a bounded character-counting fix and reported that audits of other character-counting and slice-detoasting callers found no equivalent problem #4.
- Noah expanded tests for exhausted input, incomplete trailing characters, and four-byte characters #5; subsequent Valgrind testing exposed an instrumentation-order problem, so he added a separate fix and announced plans to unblock an out-of-cycle release #6.
- Thomas Munro approved moving Valgrind checks after encoding-error exits #7, then proposed replacing the substring pre-scan with incremental bounds checks, combining his implementation with Noah's tests and detoasting correction and acknowledging changed embedded-NUL behavior #8.
- Noah clarified the requested-versus-returned slice lengths, expanded the boundary comment, and judged the larger rewrite too risky for hurried backpatching #9; Thomas agreed to reserve it for master-only work #10 and subsequently posted an explicit approval #11.
- The conservative substring patch from #6 landed with the clarified comment as 9f4fd119b2, while its separate Valgrind patch landed with commit-message wording edits as 4644f8b23b; Noah confirmed the substring landing in #12.
- Tom Lane then reported buildfarm and locally reproduced compiler warnings that text_substring() could use E uninitialized #13, prompting a follow-up that explicitly initializes E in two branches.
- That warning suppression appears in the supplied candidates as 8cef93d8a5, d04b34d685, 2280ab3545, ec86152e02, 50d361f622, and a0769e74d6, all carrying the same two assignment changes with differing branch context; Noah announced the fix in #14.
- The thread ends with Noah archiving a not-for-commit experiment that converts test literals to multibyte text and forces compression; it reproduced the original regression but found no additional bugs, leaving the conservative fixes landed and Thomas's broader rewrite deferred #15.