bufmgr code cleanup

From: Neil Conway <neilc(at)samurai(dot)com>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: bufmgr code cleanup
Date: 2003-11-03 06:28:41
Message-ID: 1067840921.3089.184.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

This patch cleans up some of the bufmgr code:

- replace uses of

LockBuffer(buf, BUFFER_LOCK_UNLOCK);
ReleaseBuffer(buf);

with the equivalent, but more concise:

UnlockAndReleaseBuffer(buf);

- analogous changes were made by replacing LockBuffer() + WriteBuffer()
with UnlockAndWriteBuffer()

- remove a bunch of #ifdef BMTRACE code, since it was ugly and broken
anyway

- remove an unused buffer descriptor bit flag (BM_PRIVATE)

- move the definition of INVALID_DESCRIPTOR to out of bufmgr.h and into
freelist.c, since it is the only file that uses it

- remove another unused function, and fix a few comments

Please apply to the CVS HEAD.

-Neil

Attachment Content-Type Size
bufmgr_cleanup-3.patch text/x-patch 24.2 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-11-03 08:09:37 Re: "make check" improvement for cygwin
Previous Message Claudio Natoli 2003-11-03 05:47:05 Win32 patch for Makefile.shlib