Reset the binary heap in MergeAppend rescans.
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/nodeMergeAppend.c | modified | +1 −0 |
| src/backend/lib/binaryheap.c | modified | +17 −3 |
| src/include/lib/binaryheap.h | modified | +1 −0 |