On Thu, Dec 8, 2016 at 12:50 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Jeff Janes <jeff.ja...@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 -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers