Re: BUG #8410: out of binary heap slots - Mailing list pgsql-bugs

From Andres Freund
Subject Re: BUG #8410: out of binary heap slots
Date
Msg-id 20130830235553.GB11360@awork2.anarazel.de
Whole thread Raw
In response to Re: BUG #8410: out of binary heap slots  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #8410: out of binary heap slots
List pgsql-bugs
On 2013-08-30 19:28:39 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2013-08-30 18:55:53 -0400, Tom Lane wrote:
> >> Not sure.  It's pretty disturbing that this wasn't caught earlier;
> >> it seems to me that means there's no regression coverage that hits
> >> ExecReScanMergeAppend.  However, I don't much like this specific test case
> >> because it seems like hitting the bug could depend on what series of
> >> random values you get.
>
> > Hm, that should be fixable. How about:
>
> Looks good, applied.

On second thought, it might not be so good looking - the queries results
are independent of the data from merge-append. So we only check that we
don't crash and not that the results make any sense. How about the
attached patch?
I verified that it fails without the binaryheap_reset().

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #8410: out of binary heap slots
Next
From: Tom Lane
Date:
Subject: Re: BUG #8410: out of binary heap slots