model-writtenrun 8609 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the thread after buildfarm assertion failures, identifying both fragile priority selection and the danger of returning indexes into mutable walsender slots in #1; Fujii Masao explained how asynchronous configuration reloads invalidate the assumed priority bounds in #2.
- Further failures prompted Tom Lane to argue for a broader repair in #6, and discussion with Kyotaro Horiguchi led to a single mutex-protected snapshot of each sender's priority and WAL positions in #9, rather than trying to synchronize all configuration updates.
- Masahiko Sawada proposed centralized priority updates in #10, but Tom Lane concluded that tolerating inconsistent priorities was more practical and insisted that the fix also handle sender exit and slot reuse in #12.
- Tom Lane posted the snapshot-and-sort implementation in #13, preserving slot-index tie-breaking because existing TAP tests depended on it; Noah Misch reported that this patch passed his test battery in #16.
- Kyotaro Horiguchi questioned the is_sync_standby flag in #15 and revised the patch in #18 and #21 to use array ordering and simplify am_sync handling, while Tom Lane objected to altered quorum behavior and exposing ordering through the API in #20 and #24.
- Masahiko Sawada spotted unrelated pg_dump changes in #22, and Kyotaro Horiguchi removed them in #23.
- Fujii Masao clarified that the dangerous case was replacement of a selected sender in the same shared-memory slot and raised backpatch ABI concerns in #25; Kyotaro Horiguchi then restarted from the original patch, retaining its flag but removing am_sync, in #27.
- Fujii Masao opposed backpatching the am_sync cleanup in #28 and supplied an alternative preserving the old API and selection algorithm in #29.
- Tom Lane rejected retaining the complicated selection algorithm and posted #33, which returned only accepted candidates, removed the redundant flag without exposing ordering, retained am_sync, and proposed preserving the obsolete API only in stable branches.
- Responding to concerns about releases during configuration changes, Tom Lane accepted asynchronous old/new configuration overlap and explained why SyncRepLock acquisition would remain before snapshot collection in #34.
- Masahiko Sawada questioned the SyncRepConfig guard in #35, but Tom Lane deferred that cleanup alongside broader am_sync changes to possible future work in #36.
- Tom Lane committed f332241a60 from #33, removing the obsolete API and helpers for HEAD and documenting the lock-order rationale; the commit explains that stable branches preserve compatibility and PostgreSQL 9.6 receives only assertion removal because a full rewrite there was judged disproportionate.
- The thread ended with agreement in #37 and Fujii Masao thanking Tom Lane for the committed fix in #38; the bug repair had landed, while broader API cleanup remained deferred.