pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Re-allow FDWs and custom scan providers to replace joins with ps
2+ messages / 2 participants
[nested] [flat]
* pgsql: Re-allow FDWs and custom scan providers to replace joins with ps
@ 2023-08-15 07:50 Etsuro Fujita <efujita@postgresql.org>
2023-08-15 10:27 ` Re: pgsql: Re-allow FDWs and custom scan providers to replace joins with ps Etsuro Fujita <etsuro.fujita@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Etsuro Fujita @ 2023-08-15 07:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals.
This was disabled in commit 6f80a8d9c due to the lack of support for
handling of pseudoconstant quals assigned to replaced joins in
createplan.c. To re-allow it, this patch adds the support by 1)
modifying the ForeignPath and CustomPath structs so that if they
represent foreign and custom scans replacing a join with a scan, they
store the list of RestrictInfo nodes to apply to the join, as in
JoinPaths, and by 2) modifying create_scan_plan() in createplan.c so
that it uses that list in that case, instead of the baserestrictinfo
list, to get pseudoconstant quals assigned to the join, as mentioned in
the commit message for that commit.
Important item for the release notes: this is non-backwards-compatible
since it modifies the ForeignPath and CustomPath structs, as mentioned
above, and changes the argument lists for FDW helper functions
create_foreignscan_path(), create_foreign_join_path(), and
create_foreign_upper_path().
Richard Guo, with some additional changes by me, reviewed by Nishant
Sharma, Suraj Kharage, and Richard Guo.
Discussion: https://postgr.es/m/CADrsxdbcN1vejBaf8a%2BQhrZY5PXL-04mCd4GDu6qm6FigDZd6Q%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9e9931d2bf40e2fea447d779c2e133c2c1256ef3
Modified Files
--------------
contrib/file_fdw/file_fdw.c | 1 +
contrib/postgres_fdw/expected/postgres_fdw.out | 30 +++++++++-----------------
contrib/postgres_fdw/postgres_fdw.c | 20 ++++++++++++-----
contrib/postgres_fdw/sql/postgres_fdw.sql | 2 +-
doc/src/sgml/custom-scan.sgml | 16 ++++++++++++++
doc/src/sgml/fdwhandler.sgml | 11 ++++++++++
src/backend/optimizer/path/joinpath.c | 19 ++--------------
src/backend/optimizer/plan/createplan.c | 21 +++++++++++++++++-
src/backend/optimizer/util/pathnode.c | 10 +++++++++
src/backend/optimizer/util/restrictinfo.c | 30 --------------------------
src/include/nodes/pathnodes.h | 10 +++++++++
src/include/optimizer/pathnode.h | 3 +++
src/include/optimizer/restrictinfo.h | 2 --
13 files changed, 99 insertions(+), 76 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgsql: Re-allow FDWs and custom scan providers to replace joins with ps
2023-08-15 07:50 pgsql: Re-allow FDWs and custom scan providers to replace joins with ps Etsuro Fujita <efujita@postgresql.org>
@ 2023-08-15 10:27 ` Etsuro Fujita <etsuro.fujita@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Etsuro Fujita @ 2023-08-15 10:27 UTC (permalink / raw)
To: Etsuro Fujita <efujita@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org; andrew@dunslane.net
I CCed Andrew.
On Tue, Aug 15, 2023 at 4:50 PM Etsuro Fujita <efujita@postgresql.org> wrote:
> Re-allow FDWs and custom scan providers to replace joins with pseudoconstant quals.
This broke blackhole_fdw, which is tested in buildfarm member crake,
because it changed the argument list for create_foreignscan_path(), as
mentioned in the commit message. So I think we need to modify
blackhole_fdw accordingly. Andrew, shall I create a patch for that?
Best regards,
Etsuro Fujita
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-08-15 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15 07:50 pgsql: Re-allow FDWs and custom scan providers to replace joins with ps Etsuro Fujita <efujita@postgresql.org>
2023-08-15 10:27 ` Etsuro Fujita <etsuro.fujita@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox