Wiki / Plan Nodes / Scan
Tid Range Scan
TidRangeScan
Scans a relation over a range of tuple identifiers.
Reading PostgreSQL 18.6.
Description
Scans a relation over a range of tuple identifiers.
- Core node tag
- T_TidRangeScan
- Structured EXPLAIN Node Type
- Tid Range Scan
- Inputs
- A relation and tuple-identifier bounds
- Output
- Selected table tuples
- Executor initializer
- ExecInitTidRangeScan
- Memory mechanism
- unclassified
EXPLAIN names and attributes
Structured formats use the Node Type above. Text-format spellings can also include operation, strategy, join type, scan direction or aggregation-stage attributes.
Text names recorded by this source: Tid Range Scan.
Parallel-aware and parallel-safe are different plan properties. A node running inside a parallel worker is not necessarily a parallel-aware node.
Memory and temporary storage
This extraction does not assign a universal memory limit or spill policy to this node. Inspect the same-build implementation and its expressions or provider.
Parallel execution and instrumentation
The source callbacks below can coordinate execution or collect worker instrumentation. Their presence is not a blanket claim that this node supports a shared parallel scan or shared state.
Callbacks in this build: none extracted from this node implementation.
Executor implementation notes
nodeTidrangescan.c Routines to support TID range scans of relations
It's sufficient to check varattno to identify the CTID variable, as any Var in the relation scan qual must be for our table. (Even if it's a parameterized scan referencing some other table's CTID, the other table's Var would have become a Param by the time it gets here.)
For the given 'expr', build and return an appropriate TidOpExpr taking into account the expr's operator and operand order.
Extract the qual subexpressions that yield TIDs to search for, and compile them into ExprStates if they're ordinary expressions.
Compute and set node's block and offset range to scan by evaluating node->trss_tidexprs. Returns false if we detect the range cannot contain any tuples. Returns true if it's possible for the range to contain tuples. We don't bother validating that trss_mintid is less than or equal to trss_maxtid, as the scan_set_tidrange() table AM function will handle that.
EXPLAIN identity in core source
case T_TidRangeScan:
pname = sname = "Tid Range Scan";
break;EXPLAIN labels in this source build
| Text-format label | Structured node identity |
|---|---|
| Tid Range Scan | Tid Range Scan |
Related entries
Documentation and source
- src/backend/commands/explain.c:1459
- src/backend/executor/execProcnode.c:244
- src/backend/executor/nodeTidrangescan.c
- src/include/nodes/plannodes.h
Source build
- Version
- 18.6
- Build
- PostgreSQL 18.6 source archive
- Source fingerprint
555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
Compare versions
PostgreSQL 17 → 18: unchanged.
Compares recorded interfaces and attributes. Source fingerprints and build metadata are excluded; an absent sample is not proof of the introduction or removal release.
Related entries
Bitmap Heap ScanBitmapHeapScanCTE ScanCteScanFunction ScanFunctionScanIndex Only ScanIndexOnlyScanIndex ScanIndexScanNamed Tuplestore ScanNamedTuplestoreScanSample ScanSampleScanSeq ScanSeqScanSubquery ScanSubqueryScanTable Function ScanTableFuncScanTid ScanTidScanValues ScanValuesScan
Export JSON · Back to Plan Nodes · Recorded in PostgreSQL 14 through 20; the first sample is not necessarily its introduction.