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