summaryrefslogtreecommitdiff
path: root/src/include/access/heapam.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-04-21 18:24:26 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-04-21 18:24:26 +0000
commit37fa3b6c89abc05f8c4691440a27427db3a6e03b (patch)
tree3a1ddb224fee306bab8ca6282b1fcfd9e7692975 /src/include/access/heapam.h
parent95a03e9cdf7e0e33c2655dd20d2b64db191f3a21 (diff)
Tweak indexscan and seqscan code to arrange that steps from one page to
the next are handled by ReleaseAndReadBuffer rather than separate ReleaseBuffer and ReadBuffer calls. This cuts the number of acquisitions of the BufMgrLock by a factor of 2 (possibly more, if an indexscan happens to pull successive rows from the same heap page). Unfortunately this doesn't seem enough to get us out of the recently discussed context-switch storm problem, but it's surely worth doing anyway.
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r--src/include/access/heapam.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 9f91d81107d..9f138524155 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.88 2004/04/01 21:28:45 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.89 2004/04/21 18:24:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -150,6 +150,9 @@ extern HeapTuple heap_getnext(HeapScanDesc scan, ScanDirection direction);
extern bool heap_fetch(Relation relation, Snapshot snapshot,
HeapTuple tuple, Buffer *userbuf, bool keep_buf,
PgStat_Info *pgstat_info);
+extern bool heap_release_fetch(Relation relation, Snapshot snapshot,
+ HeapTuple tuple, Buffer *userbuf, bool keep_buf,
+ PgStat_Info *pgstat_info);
extern ItemPointer heap_get_latest_tid(Relation relation, Snapshot snapshot,
ItemPointer tid);