From 1c2de4774620469375e6393fbdbcdaffb0c2d0b5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 16 Oct 2004 18:05:07 +0000 Subject: Remove BufferLocks[] array in favor of a single pointer to the buffer (if any) currently waited for by LockBufferForCleanup(), which is all that we were using it for anymore. Saves some space and eliminates proportional-to-NBuffers slowdown in UnlockBuffers(). --- src/include/storage/buf_internals.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/include') diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h index 355859faa3b..857d26a22b4 100644 --- a/src/include/storage/buf_internals.h +++ b/src/include/storage/buf_internals.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.73 2004/08/29 05:06:58 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/buf_internals.h,v 1.74 2004/10/16 18:05:07 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -75,8 +75,7 @@ typedef struct buftag ) /* - * BufferDesc -- shared buffer cache metadata for a single - * shared buffer descriptor. + * BufferDesc -- shared descriptor/state data for a single shared buffer. */ typedef struct sbufdesc { @@ -108,16 +107,6 @@ typedef struct sbufdesc #define BufferDescriptorGetBuffer(bdesc) ((bdesc)->buf_id + 1) - -/* - * Each backend has its own BufferLocks[] array holding flag bits - * showing what locks it has set on each buffer. - * - * We have to free these locks during ereport(ERROR)... - */ -#define BL_IO_IN_PROGRESS (1 << 0) /* unimplemented */ -#define BL_PIN_COUNT_LOCK (1 << 1) - /* entry for buffer lookup hashtable */ typedef struct { @@ -206,7 +195,6 @@ extern void BufTableDelete(BufferTag *tagPtr); /* bufmgr.c */ extern BufferDesc *BufferDescriptors; -extern bits8 *BufferLocks; /* localbuf.c */ extern BufferDesc *LocalBufferDescriptors; -- cgit v1.2.3