Re: v12.0: ERROR: could not find pathkey item to sort

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org, Amit Langote <amitlangote09@gmail.com>
Date: 2019-10-13T18:06:02Z
Lists: pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> On Fri, Oct 11, 2019 at 10:48:37AM -0400, Tom Lane wrote:
>> Could you provide a self-contained test case please?

> [ test case ]

Oh, this is the same issue Amit described in 

https://www.postgresql.org/message-id/flat/CA%2BHiwqG2WVUGmLJqtR0tPFhniO%3DH%3D9qQ%2BZ3L_ZC%2BY3-EVQHFGg%40mail.gmail.com

namely that we're not generating EquivalenceClass members corresponding
to sub-joins of a partitionwise join.

Are you interested in helping to test the patches proposed there?

			regards, tom lane



Commits

  1. Generate EquivalenceClass members for partitionwise child join rels.

  2. Suppress Append and MergeAppend plan nodes that have a single child.