model-writtenrun 7332 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Victor Yegorov reported that upgrading PostgreSQL 12.9 to 14.2 caused an ltree GiST query to crash, while REINDEX removed the failure #1.
- Tomas Vondra requested index-page diagnostics, and Victor confirmed the same query worked before upgrade but pageinspect also crashed afterward; John Naylor supplied debug-build guidance #2 #3 #4.
- Investigating the diagnostic crash, Tomas identified pageinspect passing compressed ltree_gist values to ltree_out and treated that as a separate issue from the upgrade failure, following Peter Geoghegan's warning about interpreting raw GiST tuples #5 #6 #7 #8.
- Victor supplied table data and an index file, enabling Tomas to reproduce the upgrade failure and bisect it to the introduction of operator-class parameters; comparing rebuilt indexes then narrowed attention to differing root-page contents #10 #11 #13.
- Tomas found that scalar ltree functions incorrectly used the array signature default of 28 bytes instead of 8 when operator-class options were absent, and attached a patch allowing callers to select the appropriate default #14.
- Testing showed that the patch fixed indexes built on PostgreSQL 12 but broke indexes created after upgrade; the supplied thread ended with Tomas moving discussion to pgsql-hackers because distinguishing the incompatible indexes remained unresolved #15.
- Work continued in thread #45587, whose later patch #501540 is identified as the exact source of 7e74aafc43, replacing the earlier attribution to #14; Alexander Korotkov committed dedicated scalar signature macros and cleanup, crediting himself and Tomas as authors and recommending reindexing all gist_ltree_ops indexes after upgrade because existing indexes may be corrupted.