PostgreSQL Source Code git master
nodeTidrangescan.c File Reference
#include "postgres.h"
#include "access/relscan.h"
#include "access/sysattr.h"
#include "access/tableam.h"
#include "catalog/pg_operator.h"
#include "executor/executor.h"
#include "executor/nodeTidrangescan.h"
#include "nodes/nodeFuncs.h"
#include "utils/rel.h"
Include dependency graph for nodeTidrangescan.c:

Go to the source code of this file.

Data Structures

struct  TidOpExpr
 

Macros

#define IsCTIDVar(node)
 

Typedefs

typedef struct TidOpExpr TidOpExpr
 

Enumerations

enum  TidExprType { TIDEXPR_UPPER_BOUND , TIDEXPR_LOWER_BOUND }
 

Functions

static TidOpExprMakeTidOpExpr (OpExpr *expr, TidRangeScanState *tidstate)
 
static void TidExprListCreate (TidRangeScanState *tidrangestate)
 
static bool TidRangeEval (TidRangeScanState *node)
 
static TupleTableSlotTidRangeNext (TidRangeScanState *node)
 
static bool TidRangeRecheck (TidRangeScanState *node, TupleTableSlot *slot)
 
static TupleTableSlotExecTidRangeScan (PlanState *pstate)
 
void ExecReScanTidRangeScan (TidRangeScanState *node)
 
void ExecEndTidRangeScan (TidRangeScanState *node)
 
TidRangeScanStateExecInitTidRangeScan (TidRangeScan *node, EState *estate, int eflags)
 
void ExecTidRangeScanEstimate (TidRangeScanState *node, ParallelContext *pcxt)
 
void ExecTidRangeScanInitializeDSM (TidRangeScanState *node, ParallelContext *pcxt)
 
void ExecTidRangeScanReInitializeDSM (TidRangeScanState *node, ParallelContext *pcxt)
 
void ExecTidRangeScanInitializeWorker (TidRangeScanState *node, ParallelWorkerContext *pwcxt)
 

Macro Definition Documentation

◆ IsCTIDVar

#define IsCTIDVar (   node)
Value:
((node) != NULL && \
IsA((node), Var) && \
((Var *) (node))->varattno == SelfItemPointerAttributeNumber)
#define IsA(nodeptr, _type_)
Definition: nodes.h:164
struct Var Var
Definition: primnodes.h:262
#define SelfItemPointerAttributeNumber
Definition: sysattr.h:21

Definition at line 33 of file nodeTidrangescan.c.

Typedef Documentation

◆ TidOpExpr

typedef struct TidOpExpr TidOpExpr

Enumeration Type Documentation

◆ TidExprType

Enumerator
TIDEXPR_UPPER_BOUND 
TIDEXPR_LOWER_BOUND 

Definition at line 38 of file nodeTidrangescan.c.

39{
TidExprType
@ TIDEXPR_LOWER_BOUND
@ TIDEXPR_UPPER_BOUND

Function Documentation

◆ ExecEndTidRangeScan()

void ExecEndTidRangeScan ( TidRangeScanState node)

Definition at line 339 of file nodeTidrangescan.c.

340{
342
343 if (scan != NULL)
344 table_endscan(scan);
345}
struct TableScanDescData * ss_currentScanDesc
Definition: execnodes.h:1623
static void table_endscan(TableScanDesc scan)
Definition: tableam.h:985

References TidRangeScanState::ss, ScanState::ss_currentScanDesc, and table_endscan().

Referenced by ExecEndNode().

◆ ExecInitTidRangeScan()

TidRangeScanState * ExecInitTidRangeScan ( TidRangeScan node,
EState estate,
int  eflags 
)

Definition at line 359 of file nodeTidrangescan.c.

360{
361 TidRangeScanState *tidrangestate;
362 Relation currentRelation;
363
364 /*
365 * create state structure
366 */
367 tidrangestate = makeNode(TidRangeScanState);
368 tidrangestate->ss.ps.plan = (Plan *) node;
369 tidrangestate->ss.ps.state = estate;
370 tidrangestate->ss.ps.ExecProcNode = ExecTidRangeScan;
371
372 /*
373 * Miscellaneous initialization
374 *
375 * create expression context for node
376 */
377 ExecAssignExprContext(estate, &tidrangestate->ss.ps);
378
379 /*
380 * mark scan as not in progress, and TID range as not computed yet
381 */
382 tidrangestate->trss_inScan = false;
383
384 /*
385 * open the scan relation
386 */
387 currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags);
388
389 tidrangestate->ss.ss_currentRelation = currentRelation;
390 tidrangestate->ss.ss_currentScanDesc = NULL; /* no table scan here */
391
392 /*
393 * get the scan type from the relation descriptor.
394 */
395 ExecInitScanTupleSlot(estate, &tidrangestate->ss,
396 RelationGetDescr(currentRelation),
397 table_slot_callbacks(currentRelation));
398
399 /*
400 * Initialize result type and projection.
401 */
402 ExecInitResultTypeTL(&tidrangestate->ss.ps);
403 ExecAssignScanProjectionInfo(&tidrangestate->ss);
404
405 /*
406 * initialize child expressions
407 */
408 tidrangestate->ss.ps.qual =
409 ExecInitQual(node->scan.plan.qual, (PlanState *) tidrangestate);
410
411 TidExprListCreate(tidrangestate);
412
413 /*
414 * all done.
415 */
416 return tidrangestate;
417}
ExprState * ExecInitQual(List *qual, PlanState *parent)
Definition: execExpr.c:229
void ExecAssignScanProjectionInfo(ScanState *node)
Definition: execScan.c:81
void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
Definition: execTuples.c:2000
void ExecInitResultTypeTL(PlanState *planstate)
Definition: execTuples.c:1944
void ExecAssignExprContext(EState *estate, PlanState *planstate)
Definition: execUtils.c:485
Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)
Definition: execUtils.c:742
static void TidExprListCreate(TidRangeScanState *tidrangestate)
static TupleTableSlot * ExecTidRangeScan(PlanState *pstate)
#define makeNode(_type_)
Definition: nodes.h:161
#define RelationGetDescr(relation)
Definition: rel.h:541
ExprState * qual
Definition: execnodes.h:1186
Plan * plan
Definition: execnodes.h:1165
EState * state
Definition: execnodes.h:1167
ExecProcNodeMtd ExecProcNode
Definition: execnodes.h:1171
Relation ss_currentRelation
Definition: execnodes.h:1622
PlanState ps
Definition: execnodes.h:1621
Index scanrelid
Definition: plannodes.h:523
const TupleTableSlotOps * table_slot_callbacks(Relation relation)
Definition: tableam.c:59

References ExecAssignExprContext(), ExecAssignScanProjectionInfo(), ExecInitQual(), ExecInitResultTypeTL(), ExecInitScanTupleSlot(), ExecOpenScanRelation(), PlanState::ExecProcNode, ExecTidRangeScan(), makeNode, PlanState::plan, ScanState::ps, PlanState::qual, RelationGetDescr, TidRangeScan::scan, Scan::scanrelid, TidRangeScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, PlanState::state, table_slot_callbacks(), TidExprListCreate(), and TidRangeScanState::trss_inScan.

Referenced by ExecInitNode().

◆ ExecReScanTidRangeScan()

void ExecReScanTidRangeScan ( TidRangeScanState node)

Definition at line 320 of file nodeTidrangescan.c.

321{
322 /* mark scan as not in progress, and tid range list as not computed yet */
323 node->trss_inScan = false;
324
325 /*
326 * We must wait until TidRangeNext before calling table_rescan_tidrange.
327 */
328 ExecScanReScan(&node->ss);
329}
void ExecScanReScan(ScanState *node)
Definition: execScan.c:108

References ExecScanReScan(), TidRangeScanState::ss, and TidRangeScanState::trss_inScan.

Referenced by ExecReScan().

◆ ExecTidRangeScan()

static TupleTableSlot * ExecTidRangeScan ( PlanState pstate)
static

Definition at line 306 of file nodeTidrangescan.c.

307{
309
310 return ExecScan(&node->ss,
313}
TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)
Definition: execScan.c:47
bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)
Definition: executor.h:580
TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)
Definition: executor.h:579
static TupleTableSlot * TidRangeNext(TidRangeScanState *node)
static bool TidRangeRecheck(TidRangeScanState *node, TupleTableSlot *slot)
#define castNode(_type_, nodeptr)
Definition: nodes.h:182

References castNode, ExecScan(), TidRangeScanState::ss, TidRangeNext(), and TidRangeRecheck().

Referenced by ExecInitTidRangeScan().

◆ ExecTidRangeScanEstimate()

void ExecTidRangeScanEstimate ( TidRangeScanState node,
ParallelContext pcxt 
)

Definition at line 432 of file nodeTidrangescan.c.

433{
434 EState *estate = node->ss.ps.state;
435
436 node->trss_pscanlen =
438 estate->es_snapshot);
441}
#define shm_toc_estimate_chunk(e, sz)
Definition: shm_toc.h:51
#define shm_toc_estimate_keys(e, cnt)
Definition: shm_toc.h:53
Snapshot es_snapshot
Definition: execnodes.h:660
shm_toc_estimator estimator
Definition: parallel.h:41
Size table_parallelscan_estimate(Relation rel, Snapshot snapshot)
Definition: tableam.c:131

References EState::es_snapshot, ParallelContext::estimator, ScanState::ps, shm_toc_estimate_chunk, shm_toc_estimate_keys, TidRangeScanState::ss, ScanState::ss_currentRelation, PlanState::state, table_parallelscan_estimate(), and TidRangeScanState::trss_pscanlen.

Referenced by ExecParallelEstimate().

◆ ExecTidRangeScanInitializeDSM()

void ExecTidRangeScanInitializeDSM ( TidRangeScanState node,
ParallelContext pcxt 
)

Definition at line 450 of file nodeTidrangescan.c.

451{
452 EState *estate = node->ss.ps.state;
454
455 pscan = shm_toc_allocate(pcxt->toc, node->trss_pscanlen);
457 pscan,
458 estate->es_snapshot);
459 shm_toc_insert(pcxt->toc, node->ss.ps.plan->plan_node_id, pscan);
460 node->ss.ss_currentScanDesc =
462 pscan);
463}
void * shm_toc_allocate(shm_toc *toc, Size nbytes)
Definition: shm_toc.c:88
void shm_toc_insert(shm_toc *toc, uint64 key, void *address)
Definition: shm_toc.c:171
shm_toc * toc
Definition: parallel.h:44
int plan_node_id
Definition: plannodes.h:227
TableScanDesc table_beginscan_parallel_tidrange(Relation relation, ParallelTableScanDesc pscan)
Definition: tableam.c:192
void table_parallelscan_initialize(Relation rel, ParallelTableScanDesc pscan, Snapshot snapshot)
Definition: tableam.c:146

References EState::es_snapshot, PlanState::plan, Plan::plan_node_id, ScanState::ps, shm_toc_allocate(), shm_toc_insert(), TidRangeScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, PlanState::state, table_beginscan_parallel_tidrange(), table_parallelscan_initialize(), ParallelContext::toc, and TidRangeScanState::trss_pscanlen.

Referenced by ExecParallelInitializeDSM().

◆ ExecTidRangeScanInitializeWorker()

void ExecTidRangeScanInitializeWorker ( TidRangeScanState node,
ParallelWorkerContext pwcxt 
)

◆ ExecTidRangeScanReInitializeDSM()

void ExecTidRangeScanReInitializeDSM ( TidRangeScanState node,
ParallelContext pcxt 
)

Definition at line 472 of file nodeTidrangescan.c.

474{
476
477 pscan = node->ss.ss_currentScanDesc->rs_parallel;
479}
struct ParallelTableScanDescData * rs_parallel
Definition: relscan.h:66
static void table_parallelscan_reinitialize(Relation rel, ParallelTableScanDesc pscan)
Definition: tableam.h:1149

References TableScanDescData::rs_parallel, TidRangeScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, and table_parallelscan_reinitialize().

Referenced by ExecParallelReInitializeDSM().

◆ MakeTidOpExpr()

static TidOpExpr * MakeTidOpExpr ( OpExpr expr,
TidRangeScanState tidstate 
)
static

Definition at line 57 of file nodeTidrangescan.c.

58{
59 Node *arg1 = get_leftop((Expr *) expr);
60 Node *arg2 = get_rightop((Expr *) expr);
61 ExprState *exprstate = NULL;
62 bool invert = false;
63 TidOpExpr *tidopexpr;
64
65 if (IsCTIDVar(arg1))
66 exprstate = ExecInitExpr((Expr *) arg2, &tidstate->ss.ps);
67 else if (IsCTIDVar(arg2))
68 {
69 exprstate = ExecInitExpr((Expr *) arg1, &tidstate->ss.ps);
70 invert = true;
71 }
72 else
73 elog(ERROR, "could not identify CTID variable");
74
75 tidopexpr = (TidOpExpr *) palloc(sizeof(TidOpExpr));
76 tidopexpr->inclusive = false; /* for now */
77
78 switch (expr->opno)
79 {
80 case TIDLessEqOperator:
81 tidopexpr->inclusive = true;
82 /* fall through */
83 case TIDLessOperator:
84 tidopexpr->exprtype = invert ? TIDEXPR_LOWER_BOUND : TIDEXPR_UPPER_BOUND;
85 break;
86 case TIDGreaterEqOperator:
87 tidopexpr->inclusive = true;
88 /* fall through */
89 case TIDGreaterOperator:
90 tidopexpr->exprtype = invert ? TIDEXPR_UPPER_BOUND : TIDEXPR_LOWER_BOUND;
91 break;
92 default:
93 elog(ERROR, "could not identify CTID operator");
94 }
95
96 tidopexpr->exprstate = exprstate;
97
98 return tidopexpr;
99}
#define ERROR
Definition: elog.h:39
#define elog(elevel,...)
Definition: elog.h:226
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
Definition: execExpr.c:143
void * palloc(Size size)
Definition: mcxt.c:1365
static Node * get_rightop(const void *clause)
Definition: nodeFuncs.h:95
static Node * get_leftop(const void *clause)
Definition: nodeFuncs.h:83
#define IsCTIDVar(node)
Definition: nodes.h:135
Oid opno
Definition: primnodes.h:850
ExprState * exprstate
TidExprType exprtype

References elog, ERROR, ExecInitExpr(), TidOpExpr::exprstate, TidOpExpr::exprtype, get_leftop(), get_rightop(), TidOpExpr::inclusive, IsCTIDVar, OpExpr::opno, palloc(), ScanState::ps, TidRangeScanState::ss, TIDEXPR_LOWER_BOUND, and TIDEXPR_UPPER_BOUND.

Referenced by TidExprListCreate().

◆ TidExprListCreate()

static void TidExprListCreate ( TidRangeScanState tidrangestate)
static

Definition at line 106 of file nodeTidrangescan.c.

107{
108 TidRangeScan *node = (TidRangeScan *) tidrangestate->ss.ps.plan;
109 List *tidexprs = NIL;
110 ListCell *l;
111
112 foreach(l, node->tidrangequals)
113 {
114 OpExpr *opexpr = lfirst(l);
115 TidOpExpr *tidopexpr;
116
117 if (!IsA(opexpr, OpExpr))
118 elog(ERROR, "could not identify CTID expression");
119
120 tidopexpr = MakeTidOpExpr(opexpr, tidrangestate);
121 tidexprs = lappend(tidexprs, tidopexpr);
122 }
123
124 tidrangestate->trss_tidexprs = tidexprs;
125}
List * lappend(List *list, void *datum)
Definition: list.c:339
static TidOpExpr * MakeTidOpExpr(OpExpr *expr, TidRangeScanState *tidstate)
#define lfirst(lc)
Definition: pg_list.h:172
#define NIL
Definition: pg_list.h:68
Definition: pg_list.h:54
List * trss_tidexprs
Definition: execnodes.h:1939
List * tidrangequals
Definition: plannodes.h:722

References elog, ERROR, IsA, lappend(), lfirst, MakeTidOpExpr(), NIL, PlanState::plan, ScanState::ps, TidRangeScanState::ss, TidRangeScan::tidrangequals, and TidRangeScanState::trss_tidexprs.

Referenced by ExecInitTidRangeScan().

◆ TidRangeEval()

static bool TidRangeEval ( TidRangeScanState node)
static

Definition at line 139 of file nodeTidrangescan.c.

140{
141 ExprContext *econtext = node->ss.ps.ps_ExprContext;
142 ItemPointerData lowerBound;
143 ItemPointerData upperBound;
144 ListCell *l;
145
146 /*
147 * Set the upper and lower bounds to the absolute limits of the range of
148 * the ItemPointer type. Below we'll try to narrow this range on either
149 * side by looking at the TidOpExprs.
150 */
151 ItemPointerSet(&lowerBound, 0, 0);
153
154 foreach(l, node->trss_tidexprs)
155 {
156 TidOpExpr *tidopexpr = (TidOpExpr *) lfirst(l);
157 ItemPointer itemptr;
158 bool isNull;
159
160 /* Evaluate this bound. */
161 itemptr = (ItemPointer)
163 econtext,
164 &isNull));
165
166 /* If the bound is NULL, *nothing* matches the qual. */
167 if (isNull)
168 return false;
169
170 if (tidopexpr->exprtype == TIDEXPR_LOWER_BOUND)
171 {
173
174 ItemPointerCopy(itemptr, &lb);
175
176 /*
177 * Normalize non-inclusive ranges to become inclusive. The
178 * resulting ItemPointer here may not be a valid item pointer.
179 */
180 if (!tidopexpr->inclusive)
181 ItemPointerInc(&lb);
182
183 /* Check if we can narrow the range using this qual */
184 if (ItemPointerCompare(&lb, &lowerBound) > 0)
185 ItemPointerCopy(&lb, &lowerBound);
186 }
187
188 else if (tidopexpr->exprtype == TIDEXPR_UPPER_BOUND)
189 {
191
192 ItemPointerCopy(itemptr, &ub);
193
194 /*
195 * Normalize non-inclusive ranges to become inclusive. The
196 * resulting ItemPointer here may not be a valid item pointer.
197 */
198 if (!tidopexpr->inclusive)
199 ItemPointerDec(&ub);
200
201 /* Check if we can narrow the range using this qual */
202 if (ItemPointerCompare(&ub, &upperBound) < 0)
203 ItemPointerCopy(&ub, &upperBound);
204 }
205 }
206
207 ItemPointerCopy(&lowerBound, &node->trss_mintid);
208 ItemPointerCopy(&upperBound, &node->trss_maxtid);
209
210 return true;
211}
#define InvalidBlockNumber
Definition: block.h:33
#define PG_UINT16_MAX
Definition: c.h:595
static Datum ExecEvalExprSwitchContext(ExprState *state, ExprContext *econtext, bool *isNull)
Definition: executor.h:436
void ItemPointerDec(ItemPointer pointer)
Definition: itemptr.c:114
int32 ItemPointerCompare(const ItemPointerData *arg1, const ItemPointerData *arg2)
Definition: itemptr.c:51
void ItemPointerInc(ItemPointer pointer)
Definition: itemptr.c:84
static void ItemPointerSet(ItemPointerData *pointer, BlockNumber blockNumber, OffsetNumber offNum)
Definition: itemptr.h:135
ItemPointerData * ItemPointer
Definition: itemptr.h:49
static void ItemPointerCopy(const ItemPointerData *fromPointer, ItemPointerData *toPointer)
Definition: itemptr.h:172
static Pointer DatumGetPointer(Datum X)
Definition: postgres.h:322
ExprContext * ps_ExprContext
Definition: execnodes.h:1204
ItemPointerData trss_maxtid
Definition: execnodes.h:1941
ItemPointerData trss_mintid
Definition: execnodes.h:1940

References DatumGetPointer(), ExecEvalExprSwitchContext(), TidOpExpr::exprstate, TidOpExpr::exprtype, TidOpExpr::inclusive, InvalidBlockNumber, ItemPointerCompare(), ItemPointerCopy(), ItemPointerDec(), ItemPointerInc(), ItemPointerSet(), lfirst, PG_UINT16_MAX, ScanState::ps, PlanState::ps_ExprContext, TidRangeScanState::ss, TIDEXPR_LOWER_BOUND, TIDEXPR_UPPER_BOUND, TidRangeScanState::trss_maxtid, TidRangeScanState::trss_mintid, and TidRangeScanState::trss_tidexprs.

Referenced by TidRangeNext(), and TidRangeRecheck().

◆ TidRangeNext()

static TupleTableSlot * TidRangeNext ( TidRangeScanState node)
static

Definition at line 222 of file nodeTidrangescan.c.

223{
224 TableScanDesc scandesc;
225 EState *estate;
226 ScanDirection direction;
227 TupleTableSlot *slot;
228
229 /*
230 * extract necessary information from TID scan node
231 */
232 scandesc = node->ss.ss_currentScanDesc;
233 estate = node->ss.ps.state;
234 slot = node->ss.ss_ScanTupleSlot;
235 direction = estate->es_direction;
236
237 if (!node->trss_inScan)
238 {
239 /* First time through, compute TID range to scan */
240 if (!TidRangeEval(node))
241 return NULL;
242
243 if (scandesc == NULL)
244 {
246 estate->es_snapshot,
247 &node->trss_mintid,
248 &node->trss_maxtid);
249 node->ss.ss_currentScanDesc = scandesc;
250 }
251 else
252 {
253 /* rescan with the updated TID range */
254 table_rescan_tidrange(scandesc, &node->trss_mintid,
255 &node->trss_maxtid);
256 }
257
258 node->trss_inScan = true;
259 }
260
261 /* Fetch the next tuple. */
262 if (!table_scan_getnextslot_tidrange(scandesc, direction, slot))
263 {
264 node->trss_inScan = false;
265 ExecClearTuple(slot);
266 }
267
268 return slot;
269}
static bool TidRangeEval(TidRangeScanState *node)
ScanDirection
Definition: sdir.h:25
ScanDirection es_direction
Definition: execnodes.h:659
TupleTableSlot * ss_ScanTupleSlot
Definition: execnodes.h:1624
static void table_rescan_tidrange(TableScanDesc sscan, ItemPointer mintid, ItemPointer maxtid)
Definition: tableam.h:1070
static TableScanDesc table_beginscan_tidrange(Relation rel, Snapshot snapshot, ItemPointer mintid, ItemPointer maxtid)
Definition: tableam.h:1049
static bool table_scan_getnextslot_tidrange(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
Definition: tableam.h:1086
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
Definition: tuptable.h:457

References EState::es_direction, EState::es_snapshot, ExecClearTuple(), ScanState::ps, TidRangeScanState::ss, ScanState::ss_currentRelation, ScanState::ss_currentScanDesc, ScanState::ss_ScanTupleSlot, PlanState::state, table_beginscan_tidrange(), table_rescan_tidrange(), table_scan_getnextslot_tidrange(), TidRangeEval(), TidRangeScanState::trss_inScan, TidRangeScanState::trss_maxtid, and TidRangeScanState::trss_mintid.

Referenced by ExecTidRangeScan().

◆ TidRangeRecheck()

static bool TidRangeRecheck ( TidRangeScanState node,
TupleTableSlot slot 
)
static

Definition at line 275 of file nodeTidrangescan.c.

276{
277 if (!TidRangeEval(node))
278 return false;
279
281
282 /* Recheck the ctid is still within range */
283 if (ItemPointerCompare(&slot->tts_tid, &node->trss_mintid) < 0 ||
284 ItemPointerCompare(&slot->tts_tid, &node->trss_maxtid) > 0)
285 return false;
286
287 return true;
288}
Assert(PointerIsAligned(start, uint64))
static bool ItemPointerIsValid(const ItemPointerData *pointer)
Definition: itemptr.h:83
ItemPointerData tts_tid
Definition: tuptable.h:128

References Assert(), ItemPointerCompare(), ItemPointerIsValid(), TidRangeEval(), TidRangeScanState::trss_maxtid, TidRangeScanState::trss_mintid, and TupleTableSlot::tts_tid.

Referenced by ExecTidRangeScan().