model-writtenrun 7594 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- While reviewing SP-GiST INCLUDE support, Tom Lane discovered confusion between indexed input types and leaf storage types, and proposed correcting configuration input types, enforcing storage-type agreement, and fixing index-only scan descriptors in #1; Peter Geoghegan supported limiting the changes to HEAD in #2.
- Tom posted the first implementation in #3, also changing reconstructed-value handling and proposing a test opclass because existing opclasses did not exercise reconstruction with different input and storage types.
- Tom abandoned the proposed array-element test after realizing that root leaf tuples must hold complete input values in #4, then built a name-input/text-storage opclass that exposed SP-GiST's prohibition on user-defined STORAGE clauses in #5.
- The revised series in #6 enabled STORAGE clauses, retained leafType for intermediate reconstructed values while using attType for returned values, and added range-expression tests plus the name-to-text test module.
- After inspecting PostGIS, Tom concluded that enforcing storage-type agreement would prevent upgrades of existing opclasses; #7 reports replacing the error with an amvalidate diagnostic and landing both patches as ac9099fc1d, with compatibility tests added.
- At the thread's final message, the type fixes and test module had landed, while #7 explained that the separate INCLUDE work still needed to accommodate inaccurate legacy index descriptors by constructing corrected descriptors when necessary.
- Subsequent buildfarm results exposed incorrect polygon leaf values during KNN scans, prompting dfc843d465 to copy reconstructed values only when needed and return box/polygon leaf values only when requested; this follow-up was also backpatched to PostgreSQL 12 and 13.