mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user