pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Allow FDWs to push down quals without breaking EvalPlanQual rech 2+ messages / 1 participants [nested] [flat]
* pgsql: Allow FDWs to push down quals without breaking EvalPlanQual rech @ 2015-10-15 17:14 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2015-10-15 17:14 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/5fc4c26db5120bd90348b6ee3101fcddfdf54800 Modified Files -------------- contrib/file_fdw/file_fdw.c | 3 ++- contrib/postgres_fdw/postgres_fdw.c | 14 +++++++++++--- doc/src/sgml/fdwhandler.sgml | 9 +++++++++ src/backend/executor/nodeForeignscan.c | 19 +++++++++++++++++-- src/backend/nodes/copyfuncs.c | 1 + src/backend/nodes/outfuncs.c | 1 + src/backend/nodes/readfuncs.c | 1 + src/backend/optimizer/plan/createplan.c | 7 ++++++- src/backend/optimizer/plan/setrefs.c | 4 +++- src/backend/optimizer/plan/subselect.c | 16 ++++++++++++---- src/include/nodes/execnodes.h | 1 + src/include/nodes/plannodes.h | 6 ++++++ src/include/optimizer/planmain.h | 2 +- 13 files changed, 71 insertions(+), 13 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Allow FDWs to push down quals without breaking EvalPlanQual rech @ 2015-10-15 17:14 Robert Haas <rhaas@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Robert Haas @ 2015-10-15 17:14 UTC (permalink / raw) To: pgsql-committers 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. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/5043193b78919a1bd144563aadc2f7f726549913 Modified Files -------------- contrib/file_fdw/file_fdw.c | 3 ++- contrib/postgres_fdw/postgres_fdw.c | 14 +++++++++++--- doc/src/sgml/fdwhandler.sgml | 9 +++++++++ src/backend/executor/nodeForeignscan.c | 19 +++++++++++++++++-- src/backend/nodes/copyfuncs.c | 1 + src/backend/nodes/outfuncs.c | 1 + src/backend/optimizer/plan/createplan.c | 7 ++++++- src/backend/optimizer/plan/setrefs.c | 4 +++- src/backend/optimizer/plan/subselect.c | 16 ++++++++++++---- src/include/nodes/execnodes.h | 1 + src/include/nodes/plannodes.h | 6 ++++++ src/include/optimizer/planmain.h | 2 +- 12 files changed, 70 insertions(+), 13 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-10-15 17:14 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-10-15 17:14 pgsql: Allow FDWs to push down quals without breaking EvalPlanQual rech Robert Haas <rhaas@postgresql.org> 2015-10-15 17:14 pgsql: Allow FDWs to push down quals without breaking EvalPlanQual rech Robert Haas <rhaas@postgresql.org>
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