model-writtenrun 1444 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Zepeng Zhang reported that PostgreSQL 18 returned incorrect array slices when bounds depended on another array expression, supplying a recursive Sudoku query that behaved correctly on PostgreSQL 17 #1.
- David Rowley traced the regression to an earlier subplan-parameter evaluation change #2, and Tom Lane suspected scratch-storage aliasing after an experimental pointer substitution fixed the reported query but broke regression tests #3.
- Tom identified that evaluating a subplan inside array subscripts could overwrite the already-evaluated source array, proposing explicit source pointers for EEOP_PARAM_SET or an intermediate copy #4; Andres Freund independently identified the storage conflict and noted that ordinary array indexing was also affected #5.
- Andres attached a fix that evaluated subplan arguments into the subplan’s result storage and made EEOP_PARAM_SET read through explicit pointers #6; Tom endorsed it and agreed that the Sudoku reproducer needed simplification for regression testing #7.
- Tom supplied a compact array-indexing query that crashed the server, providing a simpler demonstration of the same defect #8.
- Andres committed the attached implementation with a comment correction and narrowed regression tests for both indexing and slicing as 75609fded3, with a backport to PostgreSQL 18, and closed the thread by confirming the push #9.