summaryrefslogtreecommitdiff
path: root/src/include/access
diff options
context:
space:
mode:
authorMelanie Plageman <melanieplageman@gmail.com>2025-03-15 10:10:51 -0400
committerMelanie Plageman <melanieplageman@gmail.com>2025-03-15 10:11:19 -0400
commit944e81bf99db2b5b70b8a389d4f273534da73f74 (patch)
treeaef5b3e8d864fcdccc81ea1688b7a1ab8e7fbdf1 /src/include/access
parent799959dc7cf0e2462601bea8d07b6edec3fa0c4f (diff)
Separate TBM[Shared|Private]Iterator and TBMIterateResult
Remove the TBMIterateResult member from the TBMPrivateIterator and TBMSharedIterator and make tbm_[shared|private_]iterate() take a TBMIterateResult as a parameter. This allows tidbitmap API users to manage multiple TBMIterateResults per scan. This is required for bitmap heap scan to use the read stream API, with which there may be multiple I/Os in flight at once, each one with a TBMIterateResult. Reviewed-by: Tomas Vondra <tomas@vondra.me> Discussion: https://postgr.es/m/d4bb26c9-fe07-439e-ac53-c0e244387e01%40vondra.me
Diffstat (limited to 'src/include/access')
-rw-r--r--src/include/access/gin_private.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h
index 95d8805b66f..aee1f70c22e 100644
--- a/src/include/access/gin_private.h
+++ b/src/include/access/gin_private.h
@@ -354,7 +354,12 @@ typedef struct GinScanEntryData
/* for a partial-match or full-scan query, we accumulate all TIDs here */
TIDBitmap *matchBitmap;
TBMPrivateIterator *matchIterator;
- TBMIterateResult *matchResult;
+
+ /*
+ * If blockno is InvalidBlockNumber, all of the other fields in the
+ * matchResult are meaningless.
+ */
+ TBMIterateResult matchResult;
OffsetNumber matchOffsets[TBM_MAX_TUPLES_PER_PAGE];
int matchNtuples;