model-writtenrun 5844 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported an assertion failure when querying asynchronous foreign tables with inheritance, alongside a recursive foreign-table connection-limit problem #1; Dmitry Dolgov investigated the recursion #2, while Etsuro Fujita distinguished it from the assertion failure #3.
- Etsuro traced the assertion to a pending asynchronous request surviving a rescan that merely reset the tuple counter, and supplied a fix that completes the node’s pending fetch before restarting its scan #4.
- Dmitry confirmed the fix worked and questioned why it checked the request’s target node #5; Etsuro explained that this avoids unnecessarily waiting for another scan’s pending fetch, preserving early results in a nested-loop query #7.
- Alexander confirmed the fix and supplied a supplemental regression test #6; Etsuro initially could not reproduce its failure and instead added an adapted original reproducer that avoided recursive connections, together with expected output and comment improvements #8.
- Alexander verified that both tests exposed the unfixed bug and preferred Etsuro’s expanded test #9; Etsuro acknowledged a likely testing mistake and aligned the remote table’s columns with the foreign-table definitions #10, which Alexander endorsed #11.
- Etsuro committed 9e283fc85d from #10 with only test-data adjustments and back-patched the fix to PostgreSQL 14; the commit credits Alexander as test-case co-author and credits testing and review by Alexander and Dmitry.
- The thread ends with Etsuro confirming the commit #12; the asynchronous-rescan assertion fix landed, while no separate fix for recursive foreign-table connections was proposed or committed here.