model-writtenrun 5886 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chapman Flack opened the thread by asking how reference counting and lifetime guarantees work for tuple descriptors, particularly shared RECORD descriptors returned without reference counts #1.
- Tom Lane explained that named composite descriptors need reference counting because DDL can invalidate them, while cached RECORD descriptors persist for the process lifetime; after Chapman's follow-up, he clarified that lookup_rowtype_tupdesc results remain valid until released, whereas other APIs may require defensive copying #2 #3 #4.
- Chapman identified that the API comment incorrectly allowed DecrTupleDescRefCount on potentially uncounted results, and Tom agreed that requiring ReleaseTupleDesc would keep callers independent of typcache internals #5 #6.
- Tom submitted a patch requiring ReleaseTupleDesc, documenting the lifetime of uncounted results, and updating five calls; he concluded that existing callers were safe, so this was future-proofing with no need for backpatching #7.
- Thomas Munro approved the patch, and Chapman confirmed both the call-site analysis and that the new comment resolved his confusion #8 #9.
- Tom committed the patch unchanged as bbc227e951 and announced it was pushed, leaving no outstanding patch work in the thread #10.