model-writtenrun 3794 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley reported that tts_virtual_copyslot() allowed a source with fewer attributes than its destination, potentially leaving stale values for materialization, and found that regression tests passed with equal-count assertions instead #1.
- Andres Freund confirmed that the assertion was inverted, recommended checking and documenting compatibility in ExecCopySlot(), and raised the possibility of legitimately copying a larger source into a smaller destination #2.
- David found no such cases in partition experiments and submitted centralized checks for equal attribute counts and compatible types, allowing InvalidOid for dropped columns and documenting both the callback and its caller #3.
- After investigating attribute mapping and whole-row handling, Andres withdrew his concern and supported an equal-count assertion with a comment explaining that the restriction could later be relaxed #4.
- David narrowed the patch to attribute-count validation, removed the type-checking helper, and added the requested documentation; the thread gave no separate explanation for dropping type validation #5.
- David committed that revision with only comment wording changes as d16a0c1e2e and announced completion in #6, leaving support for unequal attribute counts as possible future work.