diff options
author | Robert Haas <rhaas@postgresql.org> | 2015-10-15 13:00:40 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2015-10-15 13:00:40 -0400 |
commit | 5fc4c26db5120bd90348b6ee3101fcddfdf54800 (patch) | |
tree | 36f2df5232f8c58de77536cfd4d0e11889253b49 /src/backend/nodes/copyfuncs.c | |
parent | 817588bc2bd684b630da11ca068505dbd985de10 (diff) | |
download | postgresql-5fc4c26db5120bd90348b6ee3101fcddfdf54800.tar.gz postgresql-5fc4c26db5120bd90348b6ee3101fcddfdf54800.zip |
Allow FDWs to push down quals without breaking EvalPlanQual rechecks.
This fixes a long-standing bug which was discovered while investigating
the interaction between the new join pushdown code and the EvalPlanQual
machinery: if a ForeignScan appears on the inner side of a paramaterized
nestloop, an EPQ recheck would re-return the original tuple even if
it no longer satisfied the pushed-down quals due to changed parameter
values.
This fix adds a new member to ForeignScan and ForeignScanState and a
new argument to make_foreignscan, and requires changes to FDWs which
push down quals to populate that new argument with a list of quals they
have chosen to push down. Therefore, I'm only back-patching to 9.5,
even though the bug is not new in 9.5.
Etsuro Fujita, reviewed by me and by Kyotaro Horiguchi.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 0b4ab231093..c176ff978ea 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -648,6 +648,7 @@ _copyForeignScan(const ForeignScan *from) COPY_NODE_FIELD(fdw_exprs); COPY_NODE_FIELD(fdw_private); COPY_NODE_FIELD(fdw_scan_tlist); + COPY_NODE_FIELD(fdw_recheck_quals); COPY_BITMAPSET_FIELD(fs_relids); COPY_SCALAR_FIELD(fsSystemCol); |