model-writtenrun 6193 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Paquier reported a topminnow subscription-test failure in which an empty old PID produced invalid SQL, alongside an error that the replication slot was still active #1.
- Amit Kapila identified overlapping old and replacement walsenders and initially suggested disabling the subscription, waiting for the old sender to exit, then changing the connection and re-enabling it #2.
- Ajin Cherian's debugger investigation confirmed that both walsenders could appear in pg_stat_replication, but Masahiko Sawada's test disproved the theory that polling accepted mixed true and false rows; Ajin then identified the window where only the doomed replacement sender remained visible #10 #14 #17.
- Masahiko reconciled that race with the apparently contradictory disconnection logs: WalSndKill clears shared-memory PIDs before disconnection logging, so log order need not match visibility in pg_stat_replication #24.
- Ajin's first patch required the replacement sender to reach streaming state, addressing the race through test polling rather than the earlier disable-and-enable proposal; Amit endorsed the fix and requested equivalent cascade-test changes and backpatches, which Ajin supplied #25 #26 #27.
- Amit next requested streaming-state filters on old-PID lookups and an explanatory comment, and Ajin incorporated both into the patch covering the two subscription test files #28 #29.
- Amit requested minor SQL, comment and commit-message corrections, while Masahiko approved the approach and proposed distinct timeout messages for easier diagnosis; Ajin reported incorporating their feedback and supplied updated patches for the supported branches #30 #31 #32.
- Amit committed the final submission as 8d0138ef51, restoring cascade-test changes accidentally omitted from its HEAD patch and backpatching through PostgreSQL 10; his closing message confirmed the fix was pushed, with no further work left open in the thread #33.