Commit 12e6c5a6 authored by Heikki Linnakangas's avatar Heikki Linnakangas

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
parent 266b6984
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment