model-writtenrun 4155 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nishant Sharma reported that a postgres_fdw self join returned incorrect rows with enable_nestloop disabled because a pseudoconstant condition disappeared, and proposed retaining all conditions as scan filters in #1.
- Etsuro Fujita identified core scan-plan creation as the likely problem in #2, and Richard Guo replaced the local-filter approach with ForeignPath restriction storage and a one-time gating Result node in #6.
- Suraj Kharage endorsed the backend fix in #7, and Nishant tested it successfully in #8; Richard explained in #10 that moving the join restrictions into scan_clauses would violate postgresGetForeignPlan()'s assertion.
- Etsuro identified ABI incompatibilities in Richard's proposal and supplied a backportable alternative that disables affected foreign join pushdown in #11; Richard accepted that direction while raising the loss of better plans in #12, and Nishant confirmed correctness and the plan change in #13.
- Etsuro extended the disabling patch to custom-scan providers in #16, Nishant tested and approved it in #17, and Richard approved it while asking to preserve pushdown on the development branch through a fuller fix in #18.
- Etsuro combined the backportable restriction with a revised version of Richard's planner fix in #19, adding CustomPath restriction storage and consistent FDW constructor arguments while dropping the clock-dependent test in favor of the stable test supplied by the first patch.
- Richard approved both patches in #20, and Etsuro landed the first as 6f80a8d9c1 with light polishing and backports to supported branches, announcing the landing in #21.
- The remaining patch in #21 added restriction-list handling during child reparameterization; Richard questioned its necessity for currently unsupported parameterized foreign joins but accepted it for safety in #22.
- Etsuro retained that defensive handling, added guards to avoid unnecessary calls, and expanded documentation in #23; Richard approved the resulting patch in #24.
- Etsuro landed #23 as 9e9931d2bf with only comment and documentation edits, restoring affected foreign/custom join pushdown on the development branch through the new planner support, and announced completion in #25.
- After both landings, Önder Kalacı reported in #26 that the backported hook restriction broke Citus queries because Citus uses set_join_pathlist_hook to collect join information, and proposed restoring unconditional hook invocation.
- Etsuro defended the core-side correctness fix in #27, while Önder argued in #28 that hooks must remain available for extensions' own planning decisions; Etsuro reiterated the ABI rationale and pointed to the development-branch restoration in #29.
- Andres Freund argued in #30 that breaking an existing hook use in a minor release was unjustified and suggested reverting the disabling change; Etsuro defended its intended scope in #32, and Önder detailed Citus's broader join-information use and requested reconsideration in #33.
- The thread ended with both fixes landed but the stable-branch Citus compatibility dispute unresolved: Etsuro rejected reverting the restriction in #34 because that would reintroduce incorrect results for custom scans, and no further fix or revert was supplied.