@@ -1834,17 +1834,6 @@ heap_update_snapshot(HeapScanDesc scan, Snapshot snapshot)
18341834HeapTuple
18351835heap_getnext (HeapScanDesc scan , ScanDirection direction )
18361836{
1837- /*
1838- * We don't expect direct calls to heap_getnext with valid
1839- * CheckXidAlive for regular tables. Track that below.
1840- */
1841- if (unlikely (TransactionIdIsValid (CheckXidAlive ) &&
1842- !(IsCatalogRelation (scan -> rs_rd ) ||
1843- RelationIsUsedAsCatalogTable (scan -> rs_rd ))))
1844- ereport (ERROR ,
1845- (errcode (ERRCODE_INVALID_TRANSACTION_STATE ),
1846- errmsg ("improper heap_getnext call" )));
1847-
18481837 /* Note: no locking manipulations needed */
18491838
18501839 HEAPDEBUG_1 ; /* heap_getnext( info ) */
@@ -1925,16 +1914,6 @@ heap_fetch(Relation relation,
19251914 OffsetNumber offnum ;
19261915 bool valid ;
19271916
1928- /*
1929- * We don't expect direct calls to heap_fetch with valid
1930- * CheckXidAlive for regular tables. Track that below.
1931- */
1932- if (unlikely (TransactionIdIsValid (CheckXidAlive ) &&
1933- !(IsCatalogRelation (relation ) || RelationIsUsedAsCatalogTable (relation ))))
1934- ereport (ERROR ,
1935- (errcode (ERRCODE_INVALID_TRANSACTION_STATE ),
1936- errmsg ("improper heap_fetch call" )));
1937-
19381917 /*
19391918 * Fetch and pin the appropriate page of the relation.
19401919 */
@@ -2067,16 +2046,6 @@ heap_hot_search_buffer(ItemPointer tid, Relation relation, Buffer buffer,
20672046 bool valid ;
20682047 bool skip ;
20692048
2070- /*
2071- * We don't expect direct calls to heap_hot_search_buffer with
2072- * valid CheckXidAlive for regular tables. Track that below.
2073- */
2074- if (unlikely (TransactionIdIsValid (CheckXidAlive ) &&
2075- !(IsCatalogRelation (relation ) || RelationIsUsedAsCatalogTable (relation ))))
2076- ereport (ERROR ,
2077- (errcode (ERRCODE_INVALID_TRANSACTION_STATE ),
2078- errmsg ("improper heap_hot_search_buffer call" )));
2079-
20802049 /* If this is not the first call, previous call returned a (live!) tuple */
20812050 if (all_dead )
20822051 * all_dead = first_call ;
@@ -2218,16 +2187,6 @@ heap_hot_search(ItemPointer tid, Relation relation, Snapshot snapshot,
22182187 Buffer buffer ;
22192188 HeapTupleData heapTuple ;
22202189
2221- /*
2222- * We don't expect direct calls to heap_hot_search with
2223- * valid CheckXidAlive for regular tables. Track that below.
2224- */
2225- if (unlikely (TransactionIdIsValid (CheckXidAlive ) &&
2226- !(IsCatalogRelation (relation ) || RelationIsUsedAsCatalogTable (relation ))))
2227- ereport (ERROR ,
2228- (errcode (ERRCODE_INVALID_TRANSACTION_STATE ),
2229- errmsg ("improper heap_hot_search call" )));
2230-
22312190 buffer = ReadBuffer (relation , ItemPointerGetBlockNumber (tid ));
22322191 LockBuffer (buffer , BUFFER_LOCK_SHARE );
22332192 result = heap_hot_search_buffer (tid , relation , buffer , snapshot ,
@@ -2257,16 +2216,6 @@ heap_get_latest_tid(Relation relation,
22572216 ItemPointerData ctid ;
22582217 TransactionId priorXmax ;
22592218
2260- /*
2261- * We don't expect direct calls to heap_get_latest_tid with valid
2262- * CheckXidAlive for regular tables. Track that below.
2263- */
2264- if (unlikely (TransactionIdIsValid (CheckXidAlive ) &&
2265- !(IsCatalogRelation (relation ) || RelationIsUsedAsCatalogTable (relation ))))
2266- ereport (ERROR ,
2267- (errcode (ERRCODE_INVALID_TRANSACTION_STATE ),
2268- errmsg ("improper heap_get_latest_tid call" )));
2269-
22702219 /* this is to avoid Assert failures on bad input */
22712220 if (!ItemPointerIsValid (tid ))
22722221 return ;
0 commit comments