Re: postgres_fdw bug in 9.6
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-12-08T17:50:50Z
Lists: pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes: > I have a DML statement which triggers the error: > ERROR: XX000: outer pathkeys do not match mergeclauses > LOCATION: create_mergejoin_plan, createplan.c:3722 Hmm. > Any tips on investigating this further in situ? Or is the best option just > to work harder on a minimal and disclosable test case? I think we need a test case --- not minimal necessarily, but something other people can reproduce. You might find that setting enable_hashjoin and/or enable_nestloop to false makes it easier to provoke the error, since evidently this requires that we (a) generate a faulty mergejoin Path and then (b) choose it as the cheapest one, since the error occurs while converting it to a Plan. BTW, if you're not doing this in a debug (--enable-cassert) build, it'd be useful to try it in one. I'm a little suspicious that the root cause might be a memory-stomp type of problem, ie somebody scribbling on a pathkey data structure without accounting for it being shared with another path. It's possible that cassert memory checking would help catch that. regards, tom lane
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