diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-04-03 17:12:27 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-04-03 17:12:27 +0000 |
commit | b03271590ef22c6c2a5d7496b8d3ed3b07bdc92c (patch) | |
tree | 3e42eb78a3fbe73dd0f797307e6a17e0d685b395 /src/backend | |
parent | d3bf8c7097f823fd858e64697babfd0c1c134b06 (diff) | |
download | postgresql-b03271590ef22c6c2a5d7496b8d3ed3b07bdc92c.tar.gz postgresql-b03271590ef22c6c2a5d7496b8d3ed3b07bdc92c.zip |
Remove heap_release_fetch, which is no longer used anywhere; this simplifies
heap_fetch a little.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/heap/heapam.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 74e28dd2cab..51cad38f073 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.254 2008/03/26 21:10:37 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/access/heap/heapam.c,v 1.255 2008/04/03 17:12:27 tgl Exp $ * * * INTERFACE ROUTINES @@ -1335,30 +1335,6 @@ heap_fetch(Relation relation, bool keep_buf, Relation stats_relation) { - /* Assume *userbuf is undefined on entry */ - *userbuf = InvalidBuffer; - return heap_release_fetch(relation, snapshot, tuple, - userbuf, keep_buf, stats_relation); -} - -/* - * heap_release_fetch - retrieve tuple with given tid - * - * This has the same API as heap_fetch except that if *userbuf is not - * InvalidBuffer on entry, that buffer will be released before reading - * the new page. This saves a separate ReleaseBuffer step and hence - * one entry into the bufmgr when looping through multiple fetches. - * Also, if *userbuf is the same buffer that holds the target tuple, - * we avoid bufmgr manipulation altogether. - */ -bool -heap_release_fetch(Relation relation, - Snapshot snapshot, - HeapTuple tuple, - Buffer *userbuf, - bool keep_buf, - Relation stats_relation) -{ ItemPointer tid = &(tuple->t_self); ItemId lp; Buffer buffer; @@ -1367,11 +1343,9 @@ heap_release_fetch(Relation relation, bool valid; /* - * get the buffer from the relation descriptor. Note that this does a - * buffer pin, and releases the old *userbuf if not InvalidBuffer. + * Fetch and pin the appropriate page of the relation. */ - buffer = ReleaseAndReadBuffer(*userbuf, relation, - ItemPointerGetBlockNumber(tid)); + buffer = ReadBuffer(relation, ItemPointerGetBlockNumber(tid)); /* * Need share lock on buffer to examine tuple commit status. |