pgvector.git / summary / log / commit / refs
commit e47984e6161094018d67fb094fbcbc80f8ca3f0c
Author: Andrew Kane <andrew@ankane.org>
Date: Sun Aug 25 05:10:26 2024 +0000
Reset tuple sort for Postgres 12 [skip ci]
src/ivfscan.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/ivfscan.c b/src/ivfscan.c
index 91ff3cc6..0a5fea56 100644
--- a/src/ivfscan.c
+++ b/src/ivfscan.c
@@ -292,10 +292,15 @@ ivfflatrescan(IndexScanDesc scan, ScanKey keys, int nkeys, ScanKey orderbys, int
{
IvfflatScanOpaque so = (IvfflatScanOpaque) scan->opaque;
-#if PG_VERSION_NUM >= 130000
if (!so->first)
+ {
+#if PG_VERSION_NUM >= 130000
tuplesort_reset(so->sortstate);
+#else
+ tuplesort_end(so->sortstate);
+ so->sortstate = InitScanSortState(so->tupdesc);
#endif
+ }
so->first = true;
pairingheap_reset(so->listQueue);
[parent: da7d3959a31d]