Re: sorting a union over inheritance vs pathkeys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sorting a union over inheritance vs pathkeys
Date: 2014-06-26 02:14:24
Message-ID: 568.1403748864@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Michael Glaesemann <grzm(at)seespotcode(dot)net> writes:
>> -- ERROR: could not find pathkey item to sort

> Hm ... I can reproduce that in 9.3 but it seems fine in 9.4 and HEAD.
> Don't know what's going on exactly.

Interesting --- it appears that commit
a87c729153e372f3731689a7be007bc2b53f1410 is why it works in 9.4. I had
thought that was just improving plan quality, but it seems to also prevent
this problem. I guess we'd better back-patch it.

I find that 9.1 through 9.3 fail with this example; it may be that it was
the addition of MergeAppend support that exposed the issue.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ian Barwick 2014-06-26 02:41:58 Re: "RETURNING PRIMARY KEY" syntax extension
Previous Message tim_wilson 2014-06-26 00:42:51 Re: Inaccuracy in VACUUM's tuple count estimates