diff options
Diffstat (limited to 'src/include/storage')
-rw-r--r-- | src/include/storage/buf.h | 19 | ||||
-rw-r--r-- | src/include/storage/bufmgr.h | 8 |
2 files changed, 10 insertions, 17 deletions
diff --git a/src/include/storage/buf.h b/src/include/storage/buf.h index c65e4cc9975..f31d5d5cc8d 100644 --- a/src/include/storage/buf.h +++ b/src/include/storage/buf.h @@ -7,17 +7,22 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: buf.h,v 1.8 2001/01/24 19:43:27 momjian Exp $ + * $Id: buf.h,v 1.9 2001/06/09 18:16:59 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef BUF_H #define BUF_H -#define InvalidBuffer (0) -#define UnknownBuffer (-99999) +/* + * Buffer identifiers. + * + * Zero is invalid, positive is the index of a shared buffer (1..NBuffers), + * negative is the index of a local buffer (-1 .. -NLocBuffer). + */ +typedef int Buffer; -typedef long Buffer; +#define InvalidBuffer 0 /* * BufferIsInvalid @@ -26,12 +31,6 @@ typedef long Buffer; #define BufferIsInvalid(buffer) ((buffer) == InvalidBuffer) /* - * BufferIsUnknown - * True iff the buffer is unknown. - */ -#define BufferIsUnknown(buffer) ((buffer) == UnknownBuffer) - -/* * BufferIsLocal * True iff the buffer is local (not visible to other servers). */ diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index d45c8888c1d..9d7f568e193 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: bufmgr.h,v 1.51 2001/05/12 19:58:28 tgl Exp $ + * $Id: bufmgr.h,v 1.52 2001/06/09 18:16:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -75,10 +75,6 @@ extern long *LocalRefCount; * True iff the given buffer number is valid (either as a shared * or local buffer). * - * Note: - * BufferIsValid(InvalidBuffer) is False. - * BufferIsValid(UnknownBuffer) is False. - * * Note: For a long time this was defined the same as BufferIsPinned, * that is it would say False if you didn't hold a pin on the buffer. * I believe this was bogus and served only to mask logic errors. @@ -158,8 +154,6 @@ extern long *LocalRefCount; /* * prototypes for functions in bufmgr.c */ -extern Buffer RelationGetBufferWithBuffer(Relation relation, - BlockNumber blockNumber, Buffer buffer); extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum); extern int WriteBuffer(Buffer buffer); extern int WriteNoReleaseBuffer(Buffer buffer); |