88 *
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.254 2008/03/26 21:10:37 alvherre Exp $
11+ * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.255 2008/04/03 17:12:27 tgl Exp $
1212 *
1313 *
1414 * INTERFACE ROUTINES
@@ -1334,30 +1334,6 @@ heap_fetch(Relation relation,
13341334 Buffer * userbuf ,
13351335 bool keep_buf ,
13361336 Relation stats_relation )
1337- {
1338- /* Assume *userbuf is undefined on entry */
1339- * userbuf = InvalidBuffer ;
1340- return heap_release_fetch (relation , snapshot , tuple ,
1341- userbuf , keep_buf , stats_relation );
1342- }
1343-
1344- /*
1345- * heap_release_fetch - retrieve tuple with given tid
1346- *
1347- * This has the same API as heap_fetch except that if *userbuf is not
1348- * InvalidBuffer on entry, that buffer will be released before reading
1349- * the new page. This saves a separate ReleaseBuffer step and hence
1350- * one entry into the bufmgr when looping through multiple fetches.
1351- * Also, if *userbuf is the same buffer that holds the target tuple,
1352- * we avoid bufmgr manipulation altogether.
1353- */
1354- bool
1355- heap_release_fetch (Relation relation ,
1356- Snapshot snapshot ,
1357- HeapTuple tuple ,
1358- Buffer * userbuf ,
1359- bool keep_buf ,
1360- Relation stats_relation )
13611337{
13621338 ItemPointer tid = & (tuple -> t_self );
13631339 ItemId lp ;
@@ -1367,11 +1343,9 @@ heap_release_fetch(Relation relation,
13671343 bool valid ;
13681344
13691345 /*
1370- * get the buffer from the relation descriptor. Note that this does a
1371- * buffer pin, and releases the old *userbuf if not InvalidBuffer.
1346+ * Fetch and pin the appropriate page of the relation.
13721347 */
1373- buffer = ReleaseAndReadBuffer (* userbuf , relation ,
1374- ItemPointerGetBlockNumber (tid ));
1348+ buffer = ReadBuffer (relation , ItemPointerGetBlockNumber (tid ));
13751349
13761350 /*
13771351 * Need share lock on buffer to examine tuple commit status.
0 commit comments