Re: postgres_fdw bug in 9.6
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Robert Haas <robertmhaas@gmail.com>,
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Jeff Janes <jeff.janes@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-12-27T03:44:09Z
Lists: pgsql-hackers
On 2016/12/23 1:04, Robert Haas wrote: > On Wed, Dec 21, 2016 at 11:04 AM, Ashutosh Bapat > <ashutosh.bapat@enterprisedb.com> wrote: >> Some review comments >> >> 1. postgres_fdw doesn't push down semi and anti joins so you may want to >> discount these two too. >> + jointype == JOIN_SEMI || >> + jointype == JOIN_ANTI); > But in the future, it might. I plan to work on adding those cases to postgres_fdw. > We shouldn't randomly leave foot-guns > lying around if there's an easy alternative. Some FDWs might have already supported pushing down semi/anti joins. So I think it's better to handle those joins as well. >> 3. Adding new members to JoinPathExtraData may save some work for postgres_fdw >> and other FDWs which would use CreateLocalJoinPath(), but it will add few bytes >> to the structure even when there is no "FULL foreign join which requires EPQ" >> involved in the query. That may not be so much of memory overhead since the >> structure is used locally to add_paths_to_joinrel(), but it might be something >> to think about. Instead, what if we call select_mergejoin_clauses() within >> CreateLocalJoinPath() to get that information? > I think that's exactly backwards. The few bytes of storage don't > matter, but extra CPU cycles might. I agree with Robert. Best regards, Etsuro Fujita
Commits
-
Fix test case for 'outer pathkeys do not match mergeclauses' fix.
- d397f558d555 9.6.7 landed
- 92123c6ea212 10.2 landed
- 99f6a17dd62a 11.0 landed
-
postgres_fdw: Avoid 'outer pathkeys do not match mergeclauses' error.
- 4a81c022975e 9.6.7 landed
- 3f05a30b50a7 10.2 landed
- 4bbf6edfbd5d 11.0 landed
-
postgres_fdw: Consider foreign joining and foreign sorting together.
- aa09cd242fa7 9.6.0 cited
-
Allow foreign and custom joins to handle EvalPlanQual rechecks.
- 385f337c9f39 9.6.0 cited
-
Allow FDWs to push down quals without breaking EvalPlanQual rechecks.
- 5fc4c26db512 9.6.0 cited