OSDN Git Service

I posted some bufmgr cleanup a few weeks ago, but it conflicted with
authorNeil Conway <neilc@samurai.com>
Sun, 14 Dec 2003 00:34:47 +0000 (00:34 +0000)
committerNeil Conway <neilc@samurai.com>
Sun, 14 Dec 2003 00:34:47 +0000 (00:34 +0000)
commitfef0c8345a96f953ebfe59fcc22a9eeb980b25c5
tree853c777b605251bd9143a855d21cd12e62c9be06
parent81e9455150bcb1ebc5774c7c4fd4d5ed6ba8ac1b
I posted some bufmgr cleanup a few weeks ago, but it conflicted with
some concurrent changes Jan was making to the bufmgr. Here's an
updated version of the patch -- it should apply cleanly to CVS
HEAD and passes the regression tests.

This patch makes the following changes:

     - remove the UnlockAndReleaseBuffer() and UnlockAndWriteBuffer()
       macros, and replace uses of them with calls to the appropriate
       functions.

     - remove a bunch of #ifdef BMTRACE code: it is ugly & broken
       (i.e. it doesn't compile)

     - make BufferReplace() return a bool, not an int

     - cleanup some logic in bufmgr.c; should be functionality
       equivalent to the previous code, just cleaner now

     - remove the BM_PRIVATE flag as it is unused

     - improve a few comments, etc.
src/backend/access/heap/heapam.c
src/backend/access/nbtree/nbtxlog.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogutils.c
src/backend/commands/sequence.c
src/backend/storage/buffer/buf_init.c
src/backend/storage/buffer/buf_table.c
src/backend/storage/buffer/bufmgr.c
src/include/storage/buf_internals.h
src/include/storage/bufmgr.h