model-writtenrun 9527 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bharath Rupireddy reported that running a JIT query between backup start and stop could leave a cleanup callback registered and produce a false abort warning, and proposed searching the entire callback list in #1.
- Tom Lane opposed unordered callback removal because cleanup state can depend on LIFO ordering in #2, while Andres Freund identified the older backup code's assumption that no callbacks would be registered between SQL calls as the deeper bug in #3.
- After Bharath surveyed callback users and alternatives in #4, Robert Haas proposed backporting his existing persistent backup-cleanup fix and moving LLVM shutdown to on_proc_exit so earlier cleanup could still use database infrastructure in #5.
- Bharath supplied the replacement bundle in #6: a tested LLVM registration change, PostgreSQL 11 and 12 adaptations of Robert's backup fix from thread #41654, and a comment patch documenting LIFO removal.
- Robert announced completion in #10: the backup components of #6 landed as bcbc27251d and f7013683d9, preserving the persistent-handler approach from thread #41654, while bab150045b moved LLVM shutdown to on_proc_exit without an immediate backport.
- Bharath resubmitted the remaining comment patch in #11; Robert removed vague wording in his review #12, and Tom clarified the temporary-callback LIFO requirement and proposed detecting failed cancellation in #13.
- Bharath incorporated the wording and added a DEBUG3 diagnostic in #16, while Robert and Tom debated unrestricted removal and callback dependencies in #17 and #18.
- Robert outlined separate categories for temporary cleanup and subsystem shutdown in #19, Andres proposed a private PG_ENSURE_ERROR_CLEANUP list in #22, and Robert explained the existing callback split's parallel-query and reentrancy requirements in #24; no broader redesign was submitted.
- Following Michael Paquier's status inquiry in #25, Tom retained the LIFO restriction and rejected DEBUG3 as ineffective in #26, prompting Bharath's ERROR-level revision and successful regression-test report in #27.
- Tom committed #27 as c9ae5cbb88, simplifying the diagnostic to elog and also rejecting cancellation on an empty stack; his announcement in #28 explained that this developer-facing error did not need translation.
- The error-check commit c9ae5cbb88 deferred separate PG_ENSURE_ERROR_CLEANUP infrastructure because a survey found no current conflicting uses, leaving the broader redesign outside the completed fixes.
- The final message, #29, reopened the LLVM backport question in November 2023 because another backport required all LLVM context releases to precede shutdown; the supplied candidate 2db84c25df subsequently carried the same registration change to the older branches.