model-writtenrun 3720 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Zuming Jiang reported that simplifying an expression in a query involving joined subqueries changed its result from zero rows to one row, providing a reproducer in #1.
- Richard Guo traced the wrong result to self-join elimination treating identical clause expressions as duplicates despite different evaluation requirements; his patch in #2 compared entire RestrictInfo nodes while globally ignoring rinfo_serial and added a smaller regression case.
- Tom Lane warned that ignoring rinfo_serial globally would break other cases and questioned whether self-join elimination should be reverted in #3; Richard Guo agreed that the feature needed refactoring in #4.
- Alexander Korotkov argued for targeted fixes and submitted #5, replacing the global equality change with a helper that temporarily normalizes rinfo_serial during comparison; he further explained his concerns about reverting in #6, and Andrei Lepikhov supported retaining the feature while improving relation replacement in #7.
- Andrei Lepikhov approved the revised fix in #8, supplied a delta removing what he considered a redundant test INSERT, and questioned whether equal clauses and required_relids could still have different is_pushed_down or incompatible_relids values.
- Alexander Korotkov committed #5 with the test deletion from #8 and light comment and commit-message edits as 5ef34a8fc3; in #9, he acknowledged omitting Andrei Lepikhov's reviewer credit and requested a regression test exposing the danger of globally ignoring rinfo_serial.
- Richard Guo explained in #10 that removing the INSERT weakened the test because both correct and incorrect plans then returned an empty result; Alexander Korotkov agreed in #11 and restored the row in bea18b1c94, confirming the push in #12.
- Alexander Korotkov reported an indentation oversight and promised a correction in #13; the supplied candidates do not establish that correction, and the requests for additional rinfo_serial test coverage and clarification of RestrictInfo field combinations remained unanswered.
- At the thread's close in #14, Andrei Lepikhov still considered execution-result checks less necessary when a plan exposes the problem but accepted the already committed strengthening; both the optimizer fix and test restoration had landed without a revert.