1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-21 00:42:43 +03:00

Bitmap Table Scans use unified TBMIterator

With the repurposing of TBMIterator as an interface for both parallel
and serial iteration through TIDBitmaps in commit 7f9d4187e7,
bitmap table scans may now use it.

Modify bitmap table scan code to use the TBMIterator. This requires
moving around a bit of code, so a few variables are initialized
elsewhere.

Author: Melanie Plageman
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/c736f6aa-8b35-4e20-9621-62c7c82e2168%40vondra.me
This commit is contained in:
Melanie Plageman
2024-12-18 18:43:39 -05:00
parent 7f9d4187e7
commit 1a0da347a7
6 changed files with 86 additions and 123 deletions

View File

@@ -2135,10 +2135,7 @@ heapam_scan_bitmap_next_block(TableScanDesc scan,
{
CHECK_FOR_INTERRUPTS();
if (scan->st.bitmap.rs_shared_iterator)
tbmres = tbm_shared_iterate(scan->st.bitmap.rs_shared_iterator);
else
tbmres = tbm_private_iterate(scan->st.bitmap.rs_iterator);
tbmres = tbm_iterate(&scan->st.rs_tbmiterator);
if (tbmres == NULL)
return false;