model-writtenrun 8910 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robert Haas reported that non-exclusive backup cleanup could leave a callback installed after a prepared transaction registered another callback, producing spurious warnings or assertion failures, and proposed keeping a state-aware cleanup handler for the session lifetime in #1.
- Kyotaro Horiguchi found that the patch registered duplicate handlers across repeated backups, causing another assertion failure, and Magnus Hagander also requested one-time registration in #2 and #3.
- Michael Paquier checked the safety of registering cleanup before starting the backup and spotted a warning-message typo in #4; discussion considered restricting prepared transactions or broadening callback cancellation, but Robert Haas and Fujii Masao favored fixing backup cleanup directly in #8 and #9.
- Kyotaro Horiguchi supplied a registration guard and a cancellation assertion in #10, then acknowledged that the assertion change could remove the wrong handler without assertions enabled in #11; Robert Haas deferred that separate API change in #12.
- Robert Haas posted a full revision with a dedicated one-time registration helper in #14, incorporating the duplicate-registration fix while retaining the persistent-handler design.
- Tom Lane initially considered preserving a wrapper, then verified that both call sites required the callback signature and requested only an explanatory comment in #15 and #17.
- Michael Paquier preferred removing idle callbacks in #18, but Robert Haas explained that persistent registration avoids maintaining two sources of truth and also handles errors after sessionBackupState is reset in #19.
- Kyotaro Horiguchi reported successful application and behavior checks while requesting comment improvements and regression coverage in #21, and Michael Paquier reported that his checks found no breakage in #23.
- Robert Haas committed #14 as 303640199d with Tom Lane's signature comment and expanded commit-message rationale, confirming completion in #24; the commit deferred backpatching because the consequences were minor, and included neither the separate cancellation assertion nor a regression test, while the reported warning typo remained.