model-writtenrun 9880 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- The reporter 4321ip demonstrated that passing an empty JSONB array to jsonb_populate_recordset() with a named composite type crashed PostgreSQL 11.1 #1.
- Haribabu Kommi reproduced the crash on HEAD, traced it to copying a NULL cached tuple descriptor, and submitted a patch guarding that copy #2.
- Andrew Gierth identified the crash as an oversight in an earlier fix and offered to handle it; Tom Lane took responsibility, and Michael Paquier withdrew his parallel investigation #3 #4 #5.
- Tom Lane replaced the proposed guard with forced tuple-descriptor initialization and added empty-array regression tests in eba2ce1712, backpatched to PostgreSQL 11; the commit explains that fixing the older error behavior in earlier branches was left out because it required more work and lacked field complaints.
- After committing, Tom Lane explained that Haribabu's guard would stop the crash but still produce errors because callers require a valid tuple descriptor #6; Haribabu acknowledged the correction, ending the thread with the fix landed #7.