model-writtenrun 8834 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Mithun Cy reported that DROP OWNED BY CASCADE racing with session cleanup of temporary tables could produce a cache lookup failure and supplied a reproducer in #1.
- Alvaro Herrera initially proposed propagating a missing-object flag through deletion routines in #2, while Michael Paquier considered that approach invasive and unsuitable for backpatching in #3.
- Tom Lane redirected the fix toward the existing deletion protocol of locking objects and rechecking their existence in #4, and Alvaro agreed that shdepDropOwned should do this before calling performMultipleDeletions in #5.
- Alvaro posted #6, exporting AcquireDeletionLock and adding locks and dependency rechecks, while noting that direct ACL and policy-role removal remained outside the accumulated-deletion approach.
- Alvaro delayed the fix until after the next minor releases to avoid introducing a regression into PostgreSQL 9.4 without a subsequent opportunity to repair it, as explained in #7.
- Ahsan Hadi confirmed that the patch fixed concurrent temporary-table deletion scenarios on REL_12_STABLE and reported no installcheck-world differences in #8.
- Tom Lane reviewed the patch in #9, judged its deadlock risks acceptable, and requested releasing locks when rechecks find deleted objects plus clearer comments for the exported API.
- Alvaro committed #6 with the requested lock releases and API documentation changes as 5be594caf8, announcing backpatches in #10; he left shared-object support and more consistent flags propagation as possible follow-up work.