model-writtenrun 846 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2022 - Feb 2023 · 11 entries
- Hayato Kuroda opened the thread in December 2022 with #1, proposing that logical walsenders stop waiting for remote flush so delayed logical replication would not prevent publisher shutdown.
- Kyotaro Horiguchi cautioned that users might rely on existing shutdown guarantees and suggested crafted feedback in #3, but Amit Kapila identified the risk of acknowledging uncommitted transactions in #4, and Hayato's experiments did not provide a workable alternative.
- Dilip Kumar's comment corrections and Amit's request to retain pending-output checks led to #8 and #11, while Hayato reproduced shutdown blocking when a subscriber transaction held conflicting locks in #12.
- Hayato extended the proposal with a ProcessPendingWrites() exit path and nonblocking flushing in #19 and #21, distinguishing failure to receive remote confirmation from failure to drain a full output buffer.
- Masahiko Sawada raised clean-disconnection and smart-shutdown consistency concerns in #25 and #28, leading Hayato to add a second patch that propagated smart-versus-fast shutdown state through postmaster in #31.
- Andres Freund rejected unconditional early exit because it could lose the final changes needed when replacing a primary with a logical subscriber, rejected coupling the behavior to smart shutdown, and proposed an opt-in START_REPLICATION setting in #33, #35, and #37.
- Hayato implemented that protocol approach in #40, bundling the separate time-delayed replication work as a prerequisite and enabling early exit when a subscription requested delayed application.
- Initialization fixes followed in #41 and #42, after automated testing exposed uninitialized option state.
- Kyotaro and Amit argued against mixing walsender settings with output-plugin options in #43 and #44, so #46 introduced dedicated SHUTDOWN_MODE syntax and limited the implementation to logical replication.
- Reviews by Takamichi Osumi, Masahiko Sawada, and Peter Smith simplified option storage, improved diagnostics and documentation, and strengthened restart tests through #50 and #53.
- The 2023 work stopped with unresolved discussion about boolean versus enum syntax and explicitly specifying the default in #54, #56, and #61; neither the protocol extension nor its bundled delayed-replication prerequisite landed through the supplied commits.
Sep 2024 · 1 entry
- Greg Sabino Mullane described Patroni failover delays in #62, and Vitaly Davydov proposed global sender-side control in #63, renewing interest after the long gap.
Nov 2025 - Jun 2026 · 17 entries
- Andrey Silitskiy revived Hayato's work in November 2025 with #64, replacing receiver-selected protocol options with a publisher GUC and an immediate-exit path that could terminate even before WalSndCaughtUp became true.
- Fujii Masao advocated per-connection overrides and support for remote physical standbys in #65 and #67, which Andrey implemented with a PGC_USERSET wal_sender_shutdown_mode in #68.
- Alexander Korotkov proposed replication-slot settings and an additional physical-only waiting mode in #69, but Fujii and Andrey explained that connection options already provided the required flexibility in #70 and #72, leaving those additions out.
- Hayato reviewed test integration in #73, and Vitaly reproduced a hang caused by sending a shutdown warning into a full socket in #77; revisions through #81 disabled remote output before logging and process exit.
- Michael Paquier questioned aggressive shutdown behavior and compatibility with older receivers in #84, while Fujii and Andrey discussed the risks without identifying a concrete older-client failure.
- Ronan Dunklau argued that a timeout would support bounded restarts while still allowing replication to catch up before upgrades in #80 and #87, prompting Andrey to replace the enum with wal_sender_shutdown_timeout in #88.
- Japin Li corrected the documented parameter type in #89, and Alexander Korotkov polished the patch and considered it ready to commit in #91.
- Greg's detailed review in #92 and Fujii's reproduction of a nominal one-millisecond timeout taking about twenty-six seconds in #94 led to shutdown-aware sleep calculation, guarded completion messages, and positive-timeout tests in #95 and #98.
- Fujii then found another hang with physical replication, logical replication, and slot synchronization in #100; Vitaly diagnosed sleep-ordering problems in #101, Alexander supplied a missing timeout check in #102, and Andrey integrated the fixes and a regression case in #103.
- Andrey relaxed a fragile warning assertion in #104, after which Fujii and Andrey independently revised the patch in #107 and #108; Fujii consolidated the work in #109, simplifying tests, documenting connection-specific settings, and skipping SIGSTOP testing on Windows.
- Fujii committed #109 unchanged as a8f45dee91, crediting Andrey Silitskiy and Hayato Kuroda as authors and preserving unlimited waiting as the default.
- Immediately after that landing, Andres reported an intermittent CI shutdown hang in #111, and Chao Li identified the blocking pq_flush() path in WalSndDone() that bypassed timeout checks in #113.
- Fujii determined that EndCommand() could also block and that merely attempting one nonblocking flush would abandon output before the configured deadline, so #118 introduced nonblocking CommandComplete queuing and continued timeout-aware flushing.
- Chao warned in #119 that reusing ProcessPendingWrites() could append COPY traffic after CommandComplete, and Fujii replaced it with a dedicated write-only shutdown loop in #120.
- Chao approved the revised fix and reported successful macOS check-world testing in #121, and Fujii committed #120 unchanged as c0b24b32b0, announcing the push in #122.
- Alexander Lakhin reported a further test race in #123, showing that a visible walreceiver might not yet have established replication, and Hayato's investigation and Alexander's authentication-delay reproducer refined the diagnosis in #124 and #125.
- The thread ends with Andrey's test-only patch #126, which waits for a marker row to reach both replicas before stopping the walreceiver and reportedly prevents the reproduced failure; the timeout feature and shutdown-flushing fix have landed, while this final test fix remains unconfirmed as committed.