model-writtenrun 4799 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Lakshmi Narayanan Sreethar reported that DROP DATABASE immediately after CREATE SUBSCRIPTION could deadlock on PostgreSQL 15.1: the database drop waited for a tablesync worker to accept a process barrier while slot creation waited for the drop transaction #1.
- Andres Freund traced the deadlock to interrupt suppression around tablesync slot creation and explained that blocking termination across a potentially indefinite network operation was invalid #2.
- Andres proposed assertions against disabled interrupts in libpqwalreceiver #3, and Amit Kapila supported adding them to network routines except disconnect during process exit #6; this hardening was not included in the submitted patch #9.
- Amit explained that interrupt suppression had addressed a test race involving a briefly surviving slot, and proposed removing it while waiting for walsender exit or zero slots #5; Andres suggested ensuring synchronization had started first #7, but Amit identified complications from repeated synchronization failures #8.
- Zhijie Hou supplied HEAD/PG15 and PG14 patches that removed interrupt suppression and made the test poll until no slots remained, explaining that repeatedly restarted tablesync workers made waiting for two slots unreliable #9.
- Hou established that the reported deadlock began with PostgreSQL 15's database-drop barrier wait, while recommending the interruptibility fix for PG14 as well #10; Amit agreed #11, Vignesh reported successful testing across all three branches #12, and Amit approved the patch #13.
- Amit committed #9 as 6c6d6ba3ee with only test-comment and commit-message edits, backpatched through PG14, and announced the push #14.
- Months later, Andrey Borodin reported a similar DROP DATABASE hang on PostgreSQL 15.3 involving idle walsenders, but the affected cluster had been deleted during investigation #16; Amit requested the blocking backend's activity details #17, and Hou requested activity data, logs and replication-worker backtraces #18.
- The thread ended with Andrey confirming there were no active table synchronizations and that the requested activity data and logs were unavailable, leaving the later hang undiagnosed while the original fix remained committed #19.