mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +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:
@ -297,5 +297,6 @@ ExecReScanMergeAppend(MergeAppendState *node)
|
||||
if (subnode->chgParam == NULL)
|
||||
ExecReScan(subnode);
|
||||
}
|
||||
binaryheap_reset(node->ms_heap);
|
||||
node->ms_initialized = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user