mirror of
https://github.com/postgres/postgres.git
synced 2025-06-23 14:01:44 +03:00
Fix rescan of IndexScan node with the new lossy GiST distance functions.
Must reset the "reached end" flag and reorder queue at rescan. Per report from Regina Obe, bug #13349
This commit is contained in:
@ -532,10 +532,18 @@ ExecReScanIndexScan(IndexScanState *node)
|
||||
}
|
||||
node->iss_RuntimeKeysReady = true;
|
||||
|
||||
/* flush the reorder queue */
|
||||
if (node->iss_ReorderQueue)
|
||||
{
|
||||
while (!pairingheap_is_empty(node->iss_ReorderQueue))
|
||||
reorderqueue_pop(node);
|
||||
}
|
||||
|
||||
/* reset index scan */
|
||||
index_rescan(node->iss_ScanDesc,
|
||||
node->iss_ScanKeys, node->iss_NumScanKeys,
|
||||
node->iss_OrderByKeys, node->iss_NumOrderByKeys);
|
||||
node->iss_ReachedEnd = false;
|
||||
|
||||
ExecScanReScan(&node->ss);
|
||||
}
|
||||
|
Reference in New Issue
Block a user