* Prepare to fetch / check / return tuples from `tbmres->blockno` as part of * a bitmap table scan. `scan` needs to have been started via * table_beginscan_bm(). Returns false if there are no tuples to be found on * the page, true otherwise. * * Note, this is an optionally implemented function, therefore should only be * used after verifying the presence (at plan time or such). */
| 2233 | * used after verifying the presence (at plan time or such). |
| 2234 | */ |
| 2235 | static inline bool |
| 2236 | table_scan_bitmap_next_block(TableScanDesc scan, |
| 2237 | struct TBMIterateResult *tbmres) |
| 2238 | { |
| 2239 | /* |
| 2240 | * We don't expect direct calls to table_scan_bitmap_next_block with valid |
| 2241 | * CheckXidAlive for catalog or regular tables. See detailed comments in |
| 2242 | * xact.c where these variables are declared. |
| 2243 | */ |
| 2244 | if (unlikely(TransactionIdIsValid(CheckXidAlive) && !bsysscan)) |
| 2245 | elog(ERROR, "unexpected table_scan_bitmap_next_block call during logical decoding"); |
| 2246 | |
| 2247 | return scan->rs_rd->rd_tableam->scan_bitmap_next_block(scan, |
| 2248 | tbmres); |
| 2249 | } |
| 2250 | |
| 2251 | /* |
| 2252 | * Fetch the next tuple of a bitmap table scan into `slot` and return true if |