@@ -1834,17 +1834,6 @@ heap_update_snapshot(HeapScanDesc scan, Snapshot snapshot)
1834
1834
HeapTuple
1835
1835
heap_getnext (HeapScanDesc scan , ScanDirection direction )
1836
1836
{
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
-
1848
1837
/* Note: no locking manipulations needed */
1849
1838
1850
1839
HEAPDEBUG_1 ; /* heap_getnext( info ) */
@@ -1925,16 +1914,6 @@ heap_fetch(Relation relation,
1925
1914
OffsetNumber offnum ;
1926
1915
bool valid ;
1927
1916
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
-
1938
1917
/*
1939
1918
* Fetch and pin the appropriate page of the relation.
1940
1919
*/
@@ -2067,16 +2046,6 @@ heap_hot_search_buffer(ItemPointer tid, Relation relation, Buffer buffer,
2067
2046
bool valid ;
2068
2047
bool skip ;
2069
2048
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
-
2080
2049
/* If this is not the first call, previous call returned a (live!) tuple */
2081
2050
if (all_dead )
2082
2051
* all_dead = first_call ;
@@ -2218,16 +2187,6 @@ heap_hot_search(ItemPointer tid, Relation relation, Snapshot snapshot,
2218
2187
Buffer buffer ;
2219
2188
HeapTupleData heapTuple ;
2220
2189
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
-
2231
2190
buffer = ReadBuffer (relation , ItemPointerGetBlockNumber (tid ));
2232
2191
LockBuffer (buffer , BUFFER_LOCK_SHARE );
2233
2192
result = heap_hot_search_buffer (tid , relation , buffer , snapshot ,
@@ -2257,16 +2216,6 @@ heap_get_latest_tid(Relation relation,
2257
2216
ItemPointerData ctid ;
2258
2217
TransactionId priorXmax ;
2259
2218
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
-
2270
2219
/* this is to avoid Assert failures on bad input */
2271
2220
if (!ItemPointerIsValid (tid ))
2272
2221
return ;
0 commit comments