model-writtenrun 990 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo reported that remove_self_join_rel() discarded the return values of two adjust_relid_set() calls and proposed replacing these ineffective calls with assertions that self-join elimination cannot remove result relations #1.
- David Rowley checked the result-relation exclusion, asked about data-modifying CTEs, pointed out that inheritance expansion occurs after join removal, and proposed moving the assertions to the function entry and marking adjust_relid_set() pg_nodiscard #2.
- Richard explained why data-modifying CTEs remain protected and submitted a revision correcting the inheritance explanation and adding pg_nodiscard, while retaining the assertions beside the related cleanup to document why the result-relation sets remain untouched #3.
- In the last thread message, Andrei Lepikhov explained that the calls originated in earlier support for partitioned tables, which had been curtailed because of DML and RETURNING complications, and supported replacing them with assertions to aid possible future partitioned-table work #4.
- Richard subsequently committed the revised patch unchanged, completing the cleanup and crediting David Rowley as reviewer #3 c66d6d19eb.