* Prepare to fetch tuples from the next block in a sample scan. Returns false * if the sample scan is finished, true otherwise. `scan` needs to have been * started via table_beginscan_sampling(). * * This will call the TsmRoutine's NextSampleBlock() callback if necessary * (i.e. NextSampleBlock is not NULL), or perform a sequential scan over the * underlying relation. */
| 2285 | * underlying relation. |
| 2286 | */ |
| 2287 | static inline bool |
| 2288 | table_scan_sample_next_block(TableScanDesc scan, |
| 2289 | struct SampleScanState *scanstate) |
| 2290 | { |
| 2291 | /* |
| 2292 | * We don't expect direct calls to table_scan_sample_next_block with valid |
| 2293 | * CheckXidAlive for catalog or regular tables. See detailed comments in |
| 2294 | * xact.c where these variables are declared. |
| 2295 | */ |
| 2296 | if (unlikely(TransactionIdIsValid(CheckXidAlive) && !bsysscan)) |
| 2297 | elog(ERROR, "unexpected table_scan_sample_next_block call during logical decoding"); |
| 2298 | return scan->rs_rd->rd_tableam->scan_sample_next_block(scan, scanstate); |
| 2299 | } |
| 2300 | |
| 2301 | /* |
| 2302 | * Fetch the next sample tuple into `slot` and return true if a visible tuple |
no outgoing calls
no test coverage detected