Re: Function scan FDW pushdown
solaimurugan vellaipandiyan <drsolaimurugan.v@gmail.com>
From: solaimurugan vellaipandiyan <drsolaimurugan.v@gmail.com>
To: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, g.kashkin@postgrespro.ru, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-05-08T05:17:20Z
Lists: pgsql-hackers
Hi, I tested the v3 patch on current master using a postgres_fdw loopback setup. The patch mostly applied cleanly for me, with only a small manual conflict resolution needed in postgres_fdw.c (missing optimizer/clauses.h include). PostgreSQL built and started successfully after that. For testing, I used queries involving generate_series() together with a foreign table, for example: SELECT * FROM ft JOIN generate_series(1,3) g ON ft.id = g; I also tried: 1. implicit join syntax 2. LATERAL usage 3. disabling hashjoin/mergejoin to force different join paths In all cases, the plans still showed a local Function Scan and local join execution. The Remote SQL remained: SELECT id FROM public.localtab So I wasn't able to observe function scan pushdown with these testcases. Maybe I'm missing a query shape or planner condition required to trigger the new functionality. It would help to know which cases are currently expected to be pushed down. Regards, Solaimurugan V