Re: [HACKERS] postgres_fdw bug in 9.6

Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>

From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>, Jeff Janes <jeff.janes@gmail.com>, David Steele <david@pgmasters.net>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-01-12T07:15:22Z
Lists: pgsql-hackers

Attachments

(2018/01/12 10:41), Thomas Munro wrote:
> On Mon, Dec 11, 2017 at 8:25 PM, Etsuro Fujita
> <fujita.etsuro@lab.ntt.co.jp>  wrote:
>>> Now, if you're still super-concerned about this breaking something, we
>>> could commit it only to master, where it will have 9 months to bake
>>> before it gets released.  I think that's overly conservative, but I
>>> think it's still better than waiting for the rewrite you'd like to see
>>> happen.  We don't know when or if anyone is going to undertake that,
>>> and if we wait, we may easing release a v11 that's got the same defect
>>> as v9.6 and now v10.  And I don't see that we lose much by committing
>>> this now even if that rewrite does happen in time for v11.  Ripping
>>> out CreateLocalJoinPath() won't be any harder than ripping out
>>> GetExistingLocalJoinPath().
>>
>> Agreed.  Attached is an rebased version which moved the new fields in
>> JoinPathExtraData to the end of that struct.
>
> FYI this doesn't compile anymore, because initial_cost_hashjoin() and
> create_hashjoin_path() changed in master.

Thank you for letting me know about that!  Here is an updated version.

Best regards,
Etsuro Fujita

Commits

  1. Fix test case for 'outer pathkeys do not match mergeclauses' fix.

  2. postgres_fdw: Avoid 'outer pathkeys do not match mergeclauses' error.

  3. postgres_fdw: Consider foreign joining and foreign sorting together.

  4. Allow foreign and custom joins to handle EvalPlanQual rechecks.

  5. Allow FDWs to push down quals without breaking EvalPlanQual rechecks.