model-writtenrun 4197 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Matthias van de Meent reported Konstantin Knizhnik's finding that g_intbig_compress could detoast an array twice and leak the second copy, attaching a patch that corrected the pointer comparison in #1.
- Tom Lane explained that GiST invokes opclass functions in short-lived memory contexts and proposed deleting the unnecessary conditional pfree entirely in #2.
- Tom Lane instrumented g_intbig_compress and ran the intarray regression tests, confirming use of the GiST temporary context and finding no meaningful memory increase after removing pfree; he also raised documentation of these conventions as a possible follow-up in #3.
- Matthias van de Meent agreed after examining the calling paths and pointed out similar unnecessary cleanup in contrib/intarray/_int_gist.c in #4.
- Tom Lane committed 8aac9759bb as a revised fix for #1, deleting the conditional cleanup and backpatching the redundant-decompression performance fix while leaving broader pfree cleanup aside because its benefit might not justify the code churn.
- Michael Paquier supplied a separate patch removing cleanup from g_int_compress and g_int_decompress in #5, and Matthias van de Meent approved it in #6; the original fix had landed, but this broader cleanup has no recorded landing in the supplied evidence.