bufmgr code cleanup (revised)

From: Neil Conway <neilc(at)samurai(dot)com>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: bufmgr code cleanup (revised)
Date: 2003-12-10 22:50:50
Message-ID: 87d6awthh1.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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.

-Neil

Attachment Content-Type Size
bufmgr_cleanup-7.patch text/x-patch 33.2 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2003-12-11 05:30:41 improve routine vacuuming docs
Previous Message Neil Conway 2003-12-10 21:37:10 improvements to SGML