*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.122 2002/03/06 06:10:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.123 2002/04/15 23:47:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
BlockNumber
BufferGetBlockNumber(Buffer buffer)
{
- Assert(BufferIsValid(buffer));
+ Assert(BufferIsPinned(buffer));
if (BufferIsLocal(buffer))
return LocalBufferDescriptors[-buffer - 1].tag.blockNum;
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: buf.h,v 1.12 2001/11/05 17:46:35 momjian Exp $
+ * $Id: buf.h,v 1.13 2002/04/15 23:47:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
*/
#define BufferIsLocal(buffer) ((buffer) < 0)
-/*
- * If NO_BUFFERISVALID is defined, all error checking using BufferIsValid()
- * are suppressed. Decision-making using BufferIsValid is not affected.
- * This should be set only if one is sure there will be no errors.
- * - plai 9/10/90
- */
-#undef NO_BUFFERISVALID
-
#endif /* BUF_H */
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: bufmgr.h,v 1.57 2001/11/10 23:51:14 tgl Exp $
+ * $Id: bufmgr.h,v 1.58 2002/04/15 23:47:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define BUFFER_LOCK_SHARE 1
#define BUFFER_LOCK_EXCLUSIVE 2
-
-/**********************************************************************
-
- the rest is function defns in the bufmgr that are externally callable
-
- **********************************************************************/
-
/*
* These routines are beaten on quite heavily, hence the macroization.
*/
BufferBlockPointers[(buffer) - 1] \
)
-
/*
* prototypes for functions in bufmgr.c
*/