OSDN Git Service

Tweak indexscan and seqscan code to arrange that steps from one page to
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Apr 2004 18:24:26 +0000 (18:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Apr 2004 18:24:26 +0000 (18:24 +0000)
commit37fa3b6c89abc05f8c4691440a27427db3a6e03b
tree3a1ddb224fee306bab8ca6282b1fcfd9e7692975
parent95a03e9cdf7e0e33c2655dd20d2b64db191f3a21
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.
src/backend/access/heap/heapam.c
src/backend/access/index/indexam.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtpage.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsearch.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeTidscan.c
src/include/access/heapam.h
src/include/access/nbtree.h