* Fetch the next sample tuple into `slot` and return true if a visible tuple * was found, false otherwise. table_scan_sample_next_block() needs to * previously have selected a block (i.e. returned true), and no previous * table_scan_sample_next_tuple() for the same block may have returned false. * * This will call the TsmRoutine's NextSampleTuple() callback. */
| 2307 | * This will call the TsmRoutine's NextSampleTuple() callback. |
| 2308 | */ |
| 2309 | static inline bool |
| 2310 | table_scan_sample_next_tuple(TableScanDesc scan, |
| 2311 | struct SampleScanState *scanstate, |
| 2312 | TupleTableSlot *slot) |
| 2313 | { |
| 2314 | /* |
| 2315 | * We don't expect direct calls to table_scan_sample_next_tuple with valid |
| 2316 | * CheckXidAlive for catalog or regular tables. See detailed comments in |
| 2317 | * xact.c where these variables are declared. |
| 2318 | */ |
| 2319 | if (unlikely(TransactionIdIsValid(CheckXidAlive) && !bsysscan)) |
| 2320 | elog(ERROR, "unexpected table_scan_sample_next_tuple call during logical decoding"); |
| 2321 | return scan->rs_rd->rd_tableam->scan_sample_next_tuple(scan, scanstate, |
| 2322 | slot); |
| 2323 | } |
| 2324 | |
| 2325 | |
| 2326 | /* ---------------------------------------------------------------------------- |
no outgoing calls
no test coverage detected