mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -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/nbtree.h,v 1.76 2004/02/03 17:34:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.77 2004/04/21 18:24:26 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -446,6 +446,8 @@ extern void _bt_metapinit(Relation rel, bool markvalid);
|
||||
extern Buffer _bt_getroot(Relation rel, int access);
|
||||
extern Buffer _bt_gettrueroot(Relation rel);
|
||||
extern Buffer _bt_getbuf(Relation rel, BlockNumber blkno, int access);
|
||||
extern Buffer _bt_relandgetbuf(Relation rel, Buffer obuf,
|
||||
BlockNumber blkno, int access);
|
||||
extern void _bt_relbuf(Relation rel, Buffer buf);
|
||||
extern void _bt_wrtbuf(Relation rel, Buffer buf);
|
||||
extern void _bt_wrtnorelbuf(Relation rel, Buffer buf);
|
||||
|
Reference in New Issue
Block a user