model-writtenrun 2511 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ronald Cruz reported that upgrading to PostgreSQL 17 produced roughly 400,000 rows instead of 6,000 for an outer-join query, including rows that should have been excluded by IS NOT NULL, forcing a rollback to PostgreSQL 16 #1.
- Bruce Momjian suggested a composite-type NULL issue #2, but Tom Lane ruled that out and isolated an incorrectly removed IS NOT NULL filter #3; Richard Guo identified cloned join clauses as the likely mechanism #4.
- Tom proposed excluding clauses marked has_clone or is_clone from the optimization #5, and Richard accepted the possible optimization loss to preserve correctness #6, submitting the first guard and regression tests #7.
- Tom requested equivalent protection against constant-false deductions #8 and argued for protecting future callers despite uncertainty about a failing example #11; Richard extended the guard and proposed removing an earlier serial-counter safeguard #12.
- Tom clarified that clone nullingrel bits can misrepresent actual nullability, requested corrected comments, and opposed removing the serial-counter safeguard #13; tracing the reproducer confirmed that explanation and supplied an IS NULL example supporting both guards, while a broader redesign was considered unsuitable for backpatching #14.
- Richard's final revision retained serial-counter preservation, removed its now-ineffective regression case, incorporated Tom's IS NULL example, and adjusted existing tests to preserve their intended coverage #15; Tom approved it #17.
- Richard committed the final patch unchanged as 716a051aac and announced its backpatch to PostgreSQL 17 for the planned 17.5 release #18.
- After the fix landed, Bruce asked whether a separate domain NOT NULL issue should also be backpatched #19; Tom called it unrelated #20 and suggested CommitFest review #22, leaving Bruce's release-timing question unresolved at the thread's end #23.