mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-04 00:08:30 +00:00
Switched to pause and resume for IVFFlat index scans for Postgres 19 [skip ci]
This commit is contained in:
1 parent
e962accee8
commit
66accb3af6
1 file changed
+10
@@ -197,7 +197,11 @@ GetScanItems(IndexScanDesc scan, Datum value)
|
||||
searchPage = InvalidBlockNumber;
|
||||
so->searchPage = scanlist->startPage;
|
||||
so->lastContiguousPage = scanlist->lastContiguousPage;
|
||||
#if PG_VERSION_NUM >= 190000
|
||||
read_stream_resume(so->stream);
|
||||
#else
|
||||
read_stream_reset(so->stream);
|
||||
#endif
|
||||
|
||||
/* Search contiguous entry pages for list */
|
||||
for (;;)
|
||||
@@ -321,7 +325,13 @@ IvfflatReadStreamNextBlock(ReadStream *stream, void *callback_private_data, void
|
||||
IvfflatScanOpaque so = (IvfflatScanOpaque) callback_private_data;
|
||||
|
||||
if (so->searchPage > so->lastContiguousPage)
|
||||
{
|
||||
#if PG_VERSION_NUM >= 190000
|
||||
return read_stream_pause(stream);
|
||||
#else
|
||||
return InvalidBlockNumber;
|
||||
#endif
|
||||
}
|
||||
|
||||
return so->searchPage++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user