summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane2013-08-30 23:15:21 +0000
committerTom Lane2013-08-30 23:15:32 +0000
commit16e8e36cebba8909ec01ca259f32e8dd40090657 (patch)
treea47835e60a8ebc11c675e30cbe40b380f3a27951 /src/include
parentdfed97b744a4706d7c7b410667c0c5bc92d0eb8d (diff)
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.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/lib/binaryheap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/lib/binaryheap.h b/src/include/lib/binaryheap.h
index 1e99e72e515..85cafe4d4dd 100644
--- a/src/include/lib/binaryheap.h
+++ b/src/include/lib/binaryheap.h
@@ -40,6 +40,7 @@ typedef struct binaryheap
extern binaryheap *binaryheap_allocate(int capacity,
binaryheap_comparator compare,
void *arg);
+extern void binaryheap_reset(binaryheap *heap);
extern void binaryheap_free(binaryheap *heap);
extern void binaryheap_add_unordered(binaryheap *heap, Datum d);
extern void binaryheap_build(binaryheap *heap);