Re: postgres_fdw bug in 9.6
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeff Janes <jeff.janes@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-12-08T18:04:31Z
Lists: pgsql-hackers
On Thu, Dec 8, 2016 at 12:50 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > 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. Maybe it would help for Jeff to use elog_node_display() to the nodes that are causing the problem - e.g. outerpathkeys and innerpathkeys and best_path->path_mergeclauses, or just best_path - at the point where the error is thrown. That might give us enough information to see what's broken. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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