model-writtenrun 7415 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Pyhalov reported that a pushed-down join under foreign UPDATE failed when record_in() received an anonymous composite value, then identified the tension between concrete row types and sharing row identities across partition children #1 #2.
- Amit Langote proposed using a concrete row type only for the root target, and Alexander revised that helper to use the partition tree's common ancestor type because child joins could still encounter RECORD values #3 #4.
- Tom Lane favored repairing input conversion without changing planner row identities, warning about resjunk-column proliferation, differing child layouts, and traditional inheritance; Alexander supplied a standalone reproducer that required no planner-cost hack #5 #6 #7.
- Tom replaced the planner approach with a postgres_fdw patch that copies the scan tuple descriptor and substitutes each foreign table's concrete row type for anonymous RECORD attributes, covering both foreign scans and direct modification #8.
- Andrei Lepikhov and Alexander tested Tom's patch successfully but raised concerns about arbitrary ROW expressions and record-returning functions, while Amit supported retaining RECORD row identities and proposed checking that the selected Var was a whole-row reference #9 #10 #11 #12.
- In the last message, Tom distinguished pushing expressions containing ROW values from retrieving those values and agreed to add the defensive varattno check; broader record-returning function pushdown remained outside the demonstrated fix #13.
- The subsequent commit f61db909df landed Tom's patch from #8 with that defensive check and a regression test integrated into existing fixtures, leaving the earlier planner-side proposals unused.