model-writtenrun 2215 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexey Makhmutov reported that shutting down a physical standby serving a downstream logical subscriber under load could leave WAL senders spinning indefinitely, supplied reproduction scripts, and proposed making GetStandbyFlushRecPtr() return the replay position for logical senders in #1.
- Ajin Cherian verified the fix and requested clearer shutdown comments in #2, while shveta malik confirmed that slot synchronization must retain flush-position semantics in #3; Alexey expanded the comments in #4 and, following Bertrand Drouvot's function-header review in #5, supplied updated master and PostgreSQL 16 variants in #6.
- Michael Paquier objected to making GetStandbyFlushRecPtr() depend on MyWalSnd in #8, prompting Alexey to replace the helper changes with a direct GetXLogReplayRecPtr() call inside XLogSendLogical() in #9, producing one patch applicable to PostgreSQL 16, 17, and master.
- Michael endorsed the narrower fix and confirmed that IDENTIFY_SYSTEM should retain flush-LSN behavior in #10; he also agreed to proceed without an automated regression test because the existing injection-point facility could not release a shutdown-time wait after new connections were prohibited.
- Ajin supplied clearer final comment wording in #11, which Michael accepted in #12; Michael committed #9 with that wording and a rewritten commit message as 5231ed8262, reporting successful reproduction and verification on PostgreSQL 16 and 17 and backpatching through PostgreSQL 16 in #13.
- Months later, G. Sl requested a PostgreSQL 15 backpatch for similar shutdown hangs in #14, but Michael explained in #15 that this fix addresses logical decoding on standbys, a capability introduced in PostgreSQL 16, and requested a separate reproducible case.
- G. Sl clarified in #16 that the affected setup was a primary using Debezium logical replication and would need further investigation, leaving the original standby shutdown fix committed and the distinct PostgreSQL 15 report unresolved.