Skip to content

Commit e47984e

Browse files
committed
Reset tuple sort for Postgres 12 [skip ci]
1 parent da7d395 commit e47984e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ivfscan.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,15 @@ ivfflatrescan(IndexScanDesc scan, ScanKey keys, int nkeys, ScanKey orderbys, int
292292
{
293293
IvfflatScanOpaque so = (IvfflatScanOpaque) scan->opaque;
294294

295-
#if PG_VERSION_NUM >= 130000
296295
if (!so->first)
296+
{
297+
#if PG_VERSION_NUM >= 130000
297298
tuplesort_reset(so->sortstate);
299+
#else
300+
tuplesort_end(so->sortstate);
301+
so->sortstate = InitScanSortState(so->tupdesc);
298302
#endif
303+
}
299304

300305
so->first = true;
301306
pairingheap_reset(so->listQueue);

0 commit comments

Comments
 (0)