model-writtenrun 8064 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- The thread opened with Fujii Masao announcing 32a9c0bdf4, authored by Bharath Rupireddy with Fujii's adjustments, to reconnect when a cached postgres_fdw connection fails while starting a new remote transaction #1.
- Michael Paquier reported a lorikeet regression failure #2; after initially suspecting the environment, Fujii considered reverting and traced the failure to libpq not marking ECONNABORTED connections as bad #3 #4 #5.
- Fujii posted an ECONNABORTED patch covering libpq and backend SQLSTATE classification #6; Tom Lane argued that ECONNABORTED should be handled wherever ECONNRESET was recognized and moved that broader, backpatchable work to thread #43057 #7 #8.
- After the broader connection-loss fix restored reconnection, platform-dependent error wording still failed the test, so Tom committed 85d08b8b72 to compare SQLSTATE instead; he explained that treating ECONNABORTED as proof of a server crash would be unjustified #9.
- Tom also identified confusing retry control flow, missing error-state cleanup, and insufficient discrimination of caught errors in the original implementation #9.
- Fujii responded with a separate retry restructuring that extracted connection creation, replaced the backward goto with one explicit retry, restored the memory context, cleaned up error state, and checked SQLSTATE #10.
- Tom's review explained that SQLSTATE and PQstatus() must both be checked to avoid swallowing unrelated errors #11, and Fujii incorporated that guard and its rationale in #12.
- The final retry patch landed unchanged as 7fc1a81e49, and Fujii confirmed completion in #13; the test-output stopgap remained in place, with no better alternative proposed in #10.