Skip to content

Commit 6822507

Browse files
committed
Merge branch 'CORE-241-rum' of gitlab.postgrespro.ru:pgpro-dev/postgrespro into CORE-241-rum
2 parents 1138830 + 67fb7a8 commit 6822507

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

rumget.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ collectMatchBitmap(RumBtreeData *btree, RumBtreeStack *stack,
396396
tbm_add_tuples(scanEntry->matchBitmap,
397397
ipd, RumGetNPosting(itup), false);
398398
scanEntry->predictNumberResult += RumGetNPosting(itup);
399+
pfree(ipd);
399400
}
400401

401402
/*
@@ -423,6 +424,8 @@ startScanEntry(RumState *rumstate, RumScanEntry entry)
423424
entry->curAddInfoIsNull = true;
424425
entry->offset = InvalidOffsetNumber;
425426
entry->list = NULL;
427+
entry->addInfo = NULL;
428+
entry->addInfoIsNull = NULL;
426429
entry->gdi = NULL;
427430
entry->nlist = 0;
428431
entry->matchBitmap = NULL;

rumscan.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ freeScanKeys(RumScanOpaque so)
255255
{
256256
pfree(key->scanEntry);
257257
pfree(key->entryRes);
258+
pfree(key->addInfo);
259+
pfree(key->addInfoIsNull);
260+
pfree(key->queryCategories);
258261
}
259262
}
260263

@@ -278,6 +281,10 @@ freeScanKeys(RumScanOpaque so)
278281
}
279282
if (entry->list)
280283
pfree(entry->list);
284+
if (entry->addInfo)
285+
pfree(entry->addInfo);
286+
if (entry->addInfoIsNull)
287+
pfree(entry->addInfoIsNull);
281288
if (entry->matchIterator)
282289
tbm_end_iterate(entry->matchIterator);
283290
if (entry->matchBitmap)
@@ -457,6 +464,9 @@ rumrescan(IndexScanDesc scan, ScanKey scankey, int nscankeys,
457464
memmove(scan->orderByData, orderbys,
458465
scan->numberOfOrderBys * sizeof(ScanKeyData));
459466
}
467+
468+
if (so->sortstate)
469+
rum_tuplesort_end(so->sortstate);
460470
}
461471

462472
void

0 commit comments

Comments
 (0)