From fef0c8345a96f953ebfe59fcc22a9eeb980b25c5 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Sun, 14 Dec 2003 00:34:47 +0000 Subject: 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/storage/buffer/buf_table.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/backend/storage/buffer/buf_table.c') diff --git a/src/backend/storage/buffer/buf_table.c b/src/backend/storage/buffer/buf_table.c index 50088361876..33590b65fdb 100644 --- a/src/backend/storage/buffer/buf_table.c +++ b/src/backend/storage/buffer/buf_table.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/buffer/buf_table.c,v 1.33 2003/11/29 19:51:56 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/storage/buffer/buf_table.c,v 1.34 2003/12/14 00:34:47 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -117,15 +117,3 @@ BufTableDelete(BufferTag *tagPtr) return TRUE; } - -/* prints out collision stats for the buf table */ -#ifdef NOT_USED -void -DBG_LookupListCheck(int nlookup) -{ - nlookup = 10; - - hash_stats("Shared", SharedBufHash); -} - -#endif -- cgit v1.2.3