Re: Function scan FDW pushdown - Mailing list pgsql-hackers

From solaimurugan vellaipandiyan
Subject Re: Function scan FDW pushdown
Date
Msg-id CAHEL7KQU_=iKQU3dGMV+6vOBWkh=i5g7speEU=VVziRu=3v1Tw@mail.gmail.com
Whole thread
In response to Re: Function scan FDW pushdown  (Alexander Pyhalov <a.pyhalov@postgrespro.ru>)
Responses Re: Function scan FDW pushdown
List 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



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Call EndCopyFrom() after initial table sync in logical replication
Next
From: vignesh C
Date:
Subject: Re: Include schema-qualified names in publication error messages.