Thread: pgsql/src backend/access/gist/gistscan.c backe ...

pgsql/src backend/access/gist/gistscan.c backe ...

From
Tom Lane
Date:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    tgl@hub.org    01/06/09 14:16:59

Modified files:
    src/backend/access/gist: gistscan.c
    src/backend/access/heap: heapam.c
    src/backend/access/index: genam.c
    src/backend/access/rtree: rtscan.c
    src/backend/storage/buffer: bufmgr.c
    src/include/access: relscan.h skey.h
    src/include/storage: buf.h bufmgr.h

Log message:
    Remove RelationGetBufferWithBuffer(), which is horribly confused about
    appropriate pin-count manipulation, and instead use ReleaseAndReadBuffer.
    Make use of the fact that the passed-in buffer (if there is one) must
    be pinned to avoid grabbing the bufmgr spinlock when we are able to
    return this same buffer.  Eliminate unnecessary 'previous tuple' and
    'next tuple' fields of HeapScanDesc and IndexScanDesc, thereby removing
    a whole lot of bookkeeping from heap_getnext() and related routines.