model-writtenrun 7779 - 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 on PostgreSQL 13.1 when planning an ordered query over an analyzed empty foreign table, supplied a reproducer, and observed that the query worked without the assertion #1; Etsuro Fujita reproduced the failure #2.
- Etsuro explained that foreignrel->tuples and retrieved_rows can legitimately be zero and chose to retain the sanity check while relaxing its lower bound from one to zero, attaching a fix and a simpler regression test #3.
- Kyotaro Horiguchi confirmed that he had reached the same conclusion #4, and Etsuro acknowledged his review when posting an updated patch with a revised test comment and a commit message #5.
- Etsuro committed the updated patch #5 as 5e7fa189ee, preserving its code and tests exactly while rewording the commit message; the fix was also backpatched to PostgreSQL 13.
- Etsuro confirmed that the fix had been pushed in the final message #6, leaving no outstanding work identified in the thread.