diff options
Diffstat (limited to 'src/backend/access/heap/heapam.c')
-rw-r--r-- | src/backend/access/heap/heapam.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index c6e1eb79b2c..df4853bad14 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -27,8 +27,6 @@ * heap_multi_insert - insert multiple tuples into a relation * heap_delete - delete a tuple from a relation * heap_update - replace a tuple in a relation with another tuple - * heap_markpos - mark scan position - * heap_restrpos - restore position to marked location * heap_sync - sync heap, for when no WAL has been written * * NOTES @@ -280,9 +278,6 @@ initscan(HeapScanDesc scan, ScanKey key, bool is_rescan) scan->rs_cbuf = InvalidBuffer; scan->rs_cblock = InvalidBlockNumber; - /* we don't have a marked position... */ - ItemPointerSetInvalid(&(scan->rs_mctid)); - /* page-at-a-time fields are always invalid when not rs_inited */ /* @@ -6317,71 +6312,6 @@ heap_tuple_needs_freeze(HeapTupleHeader tuple, TransactionId cutoff_xid, return false; } -/* ---------------- - * heap_markpos - mark scan position - * ---------------- - */ -void -heap_markpos(HeapScanDesc scan) -{ - /* Note: no locking manipulations needed */ - - if (scan->rs_ctup.t_data != NULL) - { - scan->rs_mctid = scan->rs_ctup.t_self; - if (scan->rs_pageatatime) - scan->rs_mindex = scan->rs_cindex; - } - else - ItemPointerSetInvalid(&scan->rs_mctid); -} - -/* ---------------- - * heap_restrpos - restore position to marked location - * ---------------- - */ -void -heap_restrpos(HeapScanDesc scan) -{ - /* XXX no amrestrpos checking that ammarkpos called */ - - if (!ItemPointerIsValid(&scan->rs_mctid)) - { - scan->rs_ctup.t_data = NULL; - - /* - * unpin scan buffers - */ - if (BufferIsValid(scan->rs_cbuf)) - ReleaseBuffer(scan->rs_cbuf); - scan->rs_cbuf = InvalidBuffer; - scan->rs_cblock = InvalidBlockNumber; - scan->rs_inited = false; - } - else - { - /* - * If we reached end of scan, rs_inited will now be false. We must - * reset it to true to keep heapgettup from doing the wrong thing. - */ - scan->rs_inited = true; - scan->rs_ctup.t_self = scan->rs_mctid; - if (scan->rs_pageatatime) - { - scan->rs_cindex = scan->rs_mindex; - heapgettup_pagemode(scan, - NoMovementScanDirection, - 0, /* needn't recheck scan keys */ - NULL); - } - else - heapgettup(scan, - NoMovementScanDirection, - 0, /* needn't recheck scan keys */ - NULL); - } -} - /* * If 'tuple' contains any visible XID greater than latestRemovedXid, * ratchet forwards latestRemovedXid to the greatest one found. |