model-writtenrun 7469 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Smith discovered that AlterSubscription_refresh used the logical worker's global wrconn and posted a patch introducing a local connection variable, establishing the connection before PG_TRY, and simplifying cleanup in #1.
- Bharath Rupireddy tested the patch successfully and requested clearer commit wording in #2; Andres Freund then connected the mistake to a previously diagnosed subscription-refresh crash in #3, which Peter documented in #6.
- Tom Lane proposed renaming the overly generic global in #7; Bharath noted that it served both apply and tablesync workers in #9, and Peter incorporated the name lrep_worker_wrconn into #11.
- Japin Li questioned moving connection establishment outside PG_TRY in #12, and Peter explained that this matched nearby functions and eliminated the cleanup NULL check in #13; Bharath requested commit-message formatting and typo fixes in #15.
- Alvaro Herrera proposed separating the bugfix from the cosmetic rename and using a CamelCase global name in #16; Tom supported the split but argued that the rename should also be backpatched to prevent future confusion in #17.
- Peter split the work into two patches and adopted LogRepWorkerWalRcvConn in #18; Alvaro committed the bugfix portion as 4e8c0f1a0d, adding removal of a redundant DropSubscription initializer and backpatching the fix through PostgreSQL 10.
- After observing the bugfix landing in #19, Peter reposted the unchanged remaining rename in #21.
- Alvaro posted his previously prepared comment and whitespace adjustments in #22, explaining that the rename and its backports would wait until the minor releases were finalized.
- The rename landed unchanged from #22 as db16c65647 and was backpatched through PostgreSQL 10; Alvaro confirmed the push in #23, completing both parts of the thread.