model-writtenrun 373 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Pyhalov opened the supplied thread with a PostgreSQL 20 proposal to push joins with function scans to remote servers, crediting work with Gleb Kashkin on executor metadata and range-table index mapping while excluding complex return types and parameterized arguments #1.
- After Pyhalov rebased the proposal #2, Solaimurugan Vellaipandiyan reported successful builds but local execution in his tests #3, prompting Pyhalov to explain that pushdown must save enough transferred rows to beat local execution costs #4.
- Alexander Korotkov substantially redesigned the patch around the existing foreign-join callback and separate function stubs for each candidate join, allowing the same immutable function to participate in independent pushdown attempts against different foreign servers #5.
- Solaimurugan again observed local joins when testing the redesign #6, and Korotkov demonstrated remote-estimate-based pushdown while identifying the general postgres_fdw join cost model as the reason local plans could remain cheaper #7.
- Pyhalov found regressions involving whole-row references, record-returning functions, function-first FROM lists, executor tuple descriptors, and multi-array UNNEST #8, which Korotkov addressed by restoring metadata and multi-function support within the new architecture #9.
- Korotkov kept direct function absorption limited to INNER joins with shippable scalar-returning immutable functions, excluded same-level lateral references and WITH ORDINALITY, and deferred extension to other RTE kinds such as VALUES and CTEs #9.
- Pyhalov then demonstrated a failing UPDATE RETURNING a function's whole-row value #10, leading Korotkov to preserve function metadata through DirectModify #11; Pyhalov added correct NULL handling for nullable whole-row values #12, and Korotkov strengthened metadata assertions #13.
- Pyhalov found that function restrictions were not being classified and supplied explicit fpinfo plumbing through expression checks, while questioning parameterized function arguments and subquery handling #14.
- After the May-to-July gap, Korotkov accepted explicit fpinfo passing, fixed extension-dependent restriction classification, and explained that outer-query parameters are safely handled by ordinary foreign-scan rescans even though same-level lateral references remain excluded #15.
- Pyhalov restored function OIDs to the saved metadata so EXPLAIN could display actual function names and added checks for unexpected function expressions #16.
- Korotkov corrected stub option inheritance to avoid artificially cheap plans, added documentation and a STABLE-function rejection test #17, and Pyhalov clarified that nullable whole-row handling was already necessary #18.
- Korotkov incorporated actual function execution costs and adjusted the regression query in the final feature patch #19, which Pyhalov approved #20 before Korotkov announced his intention to commit #21.
- The feature landed as 0ee83dd4a9 from #19, with only rebasing and a blank-line adjustment, retaining Alexander Pyhalov's authorship credit.
- Anthonin Bonnefoy immediately reported an uninitialized relname compiler warning and supplied a one-line initialization #22; Pyhalov confirmed it #23, and Korotkov committed it unchanged as 9716f88ddf and announced the fix #24.
- Sami Imseih subsequently flagged an unstable UNNEST regression test and pointed to a proposed fix in another thread, without an attached patch or resolution in the supplied discussion #25.
- Karina Litskevich reported another compiler warning in foreign_join_ok() #26, and Marina Polyakova isolated it to gcc-13 with CFLAGS=-Og and supplied a branch-reordering fix that removed the temporary flags #27.
- Korotkov refined Marina's approach by initializing both relation-info pointers unconditionally and consolidating the comments #28, and Marina confirmed that the revised patch fixed the warning under the affected compiler settings #29.
- Korotkov committed the final warning fix unchanged as 0fb258d1f2 and closed the thread with a push confirmation #30; the feature and both attached warning fixes had landed, while the separately reported test instability had no recorded resolution here #25.