]> granicus.if.org Git - postgresql/commit
Reset the binary heap in MergeAppend rescans.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Aug 2013 23:15:21 +0000 (19:15 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 30 Aug 2013 23:15:32 +0000 (19:15 -0400)
commit16e8e36cebba8909ec01ca259f32e8dd40090657
treea47835e60a8ebc11c675e30cbe40b380f3a27951
parentdfed97b744a4706d7c7b410667c0c5bc92d0eb8d
Reset the binary heap in MergeAppend rescans.

Failing to do so can cause queries to return wrong data, error out or crash.
This requires adding a new binaryheap_reset() method to binaryheap.c,
but that probably should have been there anyway.

Per bug #8410 from Terje Elde.  Diagnosis and patch by Andres Freund.
src/backend/executor/nodeMergeAppend.c
src/backend/lib/binaryheap.c
src/include/lib/binaryheap.h