Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 12e6c5a

Browse files
committed
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
1 parent 266b698 commit 12e6c5a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/backend/executor/nodeIndexscan.c

+8
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,18 @@ ExecReScanIndexScan(IndexScanState *node)
532532
}
533533
node->iss_RuntimeKeysReady = true;
534534

535+
/* flush the reorder queue */
536+
if (node->iss_ReorderQueue)
537+
{
538+
while (!pairingheap_is_empty(node->iss_ReorderQueue))
539+
reorderqueue_pop(node);
540+
}
541+
535542
/* reset index scan */
536543
index_rescan(node->iss_ScanDesc,
537544
node->iss_ScanKeys, node->iss_NumScanKeys,
538545
node->iss_OrderByKeys, node->iss_NumOrderByKeys);
546+
node->iss_ReachedEnd = false;
539547

540548
ExecScanReScan(&node->ss);
541549
}

0 commit comments

Comments
 (0)