model-writtenrun 5732 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Miles Delahunty reported that orphaned temporary functions blocked pg_restore from dropping tables after their creating sessions disconnected, providing a reproducer that required a long function definition and a temporary table #1.
- Andres Freund traced the failure to temporary-object cleanup accessing toasted catalog data without an active snapshot, proposed wrapping RemoveTempRelations() in a snapshot, and designed advisory-lock synchronization to ensure tests waited for backend cleanup #2.
- Andres submitted the cleanup fix and isolation tests alongside a separate assertion patch, explaining that cached catalog snapshots usually masked the bug and that an explicit registered-or-active snapshot check would expose it #3.
- Both patches landed with their code unchanged: the cleanup fix and tests became 7c38ef2a5d, and the snapshot assertion became 2776922201; Andres confirmed that the fix and tests were backpatched to all supported branches while the assertion went only to HEAD #4.
- Months later, Yura Sokolov identified that the submitted HaveRegisteredOrActiveSnapshot() incorrectly returned false when multiple snapshots were registered and proposed corrected logic inline #5.
- Andres replied that this bug had already been fixed #6, and Yura confirmed that the current implementation was correct #7, leaving no outstanding work identified in the thread.