model-writtenrun 3294 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Önder Kalacı reported that FETCH FIRST 2 ROWS WITH TIES returned three matching rows locally but only two through postgres_fdw, whose remote query incorrectly used ordinary LIMIT #1.
- Japin Li proposed teaching the deparser to emit WITH TIES #3; after Önder requested regression coverage #4, Japin added tests and a parser extension to accept the emitted bigint cast #6.
- Alvaro Herrera questioned changing the core grammar for an FDW problem #8 #11, and Tom Lane recommended disabling WITH TIES pushdown because of possible equality differences and incompatibility with remote servers older than PostgreSQL 13 #12.
- Japin replaced the deparser and grammar changes with a planner guard that keeps WITH TIES local #13; Önder supported treating pushdown support as a separate future feature and requested smaller test output and fuller comments #14, leading to test and wording revisions #15 #16 #17.
- Etsuro Fujita explained that ORDER BY safety is already established before add_foreign_final_paths(), so collation differences do not justify an additional restriction there; the missing remote-version check remains the reason to disable pushdown #18 #21 #22.
- Japin accepted that explanation #23 and Etsuro's replacement comment #24 #25; Etsuro then stabilized the regression test against locale and tuple-order differences and posted the revised patch #26 #27.
- Etsuro committed #27 with only a one-word comment edit as 8cfbac1492, back-patching through PostgreSQL 13, and confirmed completion in #28; WITH TIES pushdown remains disabled pending future remote-version handling.