model-writtenrun 1715 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Konstantin Knizhnik reported a PostgreSQL 18 assertion failure when composite-row expansion caused the same array literal to appear twice in query-jumbling locations, and asked whether duplicate handling belonged in jumbling or pg_stat_statements #1.
- Sami Imseih initially prevented repeated squashed-list locations during jumbling #2, then found that multiple expanded arrays defeated this approach and replaced it with a post-jumbling deduplication pass and broader regression tests #4.
- Dmitry Dolgov identified that skipping squashed constants bypassed existing duplicate handling #3, and supplied an inline fix that checked duplicates first, reset their lengths to -1, and updated last_loc for squashed constants; he reported that a quick test addressed both reproductions #5.
- Sami accepted Dmitry's approach because fill_in_constant_lengths() already sorts locations #6, incorporated it into the bug fix, and added a separate patch moving normalization routines into core jumbling code #7; the next submission corrected comments and descriptions #8.
- Dmitry approved the bug fix but questioned moving a routine with only one caller #9, while Sami argued that normalization and squashing details belonged in core #10.
- Michael Paquier supported preventing extensions from modifying shared JumbleState data but wanted a broader design discussion #11; Alvaro Herrera agreed to separate that work from the backpatchable fix #12 and posted a focused revision that eliminated last_loc in favor of comparing adjacent sorted locations #13.
- After Sami endorsed the simplification and requested a comment correction #14, Alvaro committed b1635c1666 from #13 with that correction and minor variable-use cleanup, retaining the tests and backpatching through PostgreSQL 18; he confirmed the push in #16.
- The bug fix was complete at the end of the thread, while Sami undertook to continue the deferred normalization and jumbling refactoring in a separate thread #17.