model-writtenrun 5371 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Fujii Masao reported assertion failures and crashes when SQL backup functions and BASE_BACKUP were mixed in one logical replication connection, proposing both an abort-time session-state reset and a guard against overlapping backups in #1.
- Kyotaro Horiguchi proposed preventing duplicate abort-callback registration with a persistent handler in #2, then added overlap prevention and PG_FINALLY cleanup in #4 after recognizing cancellation problems in #3.
- Fujii Masao rejected calling do_pg_backup_stop() during error cleanup because it also writes backup-end WAL and waits for archiving, retaining the simpler abort-state reset in #5.
- Masahiko Sawada verified the fixes and suggested rejecting overlapping backups before sink initialization in #6; Fujii Masao adopted that placement in #7.
- Michael Paquier requested regression coverage in #8 and suggested checkpoint polling in #10, while Fujii Masao identified cancellation races in #9 and #11 and favored landing the fixes before developing tests.
- Robert Haas explained that the guard and session-state reset fix distinct bugs, suggested distinguishing them in the commit history or message, and supported proceeding without a difficult timing-sensitive test in #12.
- Michael Paquier supplied a cancellation test in #13 that waits for BaseBackupThrottle and runs pg_backup_stop() afterward in the same connection, reporting that it crashes without the fix and passes with it.
- Fujii Masao split the fixes into separate patches with an older-branch variant and suggested synchronizing the test through pg_stat_progress_basebackup in #14; Michael Paquier accepted that synchronization and proposed keeping the tests on HEAD in #15.
- The split series from #14 landed as ee79647769 for the overlapping-backup guard and b24b2be119 for the abort-state reset, with unchanged code hunks from #7 and backports to supported branches; Fujii Masao confirmed the push in #16.
- Fujii Masao reviewed the test's connection string, comment, and scenario coverage in #16; Michael Paquier responded with #17, moving tests into 001_stream_rep.pl, adopting progress-phase synchronization, and adding the overlapping-backup rejection case, although the final patch contains no explicit backend-termination test.
- Michael Paquier committed #17 unchanged as ad341469b4 and announced the HEAD-only test landing in #18, closing the thread with both bug fixes and the two tests committed.