Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1718240

Browse files
committed
The patch I sent to -patches a little while ago wasn't applied: it
was in the thread "make BufferGetBlockNumber() a macro". Tomobjected to the original patch, so I prepared a new one whichdoesn't change BufferGetBlockNumber() into a macro, it justcleans up some comments and fixes an assertion. The patchis attached.Neil Conway
1 parent33d1bb7 commit1718240

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.122 2002/03/06 06:10:02 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.123 2002/04/15 23:47:12 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1026,7 +1026,7 @@ BufmgrCommit(void)
10261026
BlockNumber
10271027
BufferGetBlockNumber(Bufferbuffer)
10281028
{
1029-
Assert(BufferIsValid(buffer));
1029+
Assert(BufferIsPinned(buffer));
10301030

10311031
if (BufferIsLocal(buffer))
10321032
returnLocalBufferDescriptors[-buffer-1].tag.blockNum;

‎src/include/storage/buf.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: buf.h,v 1.12 2001/11/05 17:46:35 momjian Exp $
10+
* $Id: buf.h,v 1.13 2002/04/15 23:47:12 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -36,12 +36,4 @@ typedef int Buffer;
3636
*/
3737
#defineBufferIsLocal(buffer)((buffer) < 0)
3838

39-
/*
40-
* If NO_BUFFERISVALID is defined, all error checking using BufferIsValid()
41-
* are suppressed.Decision-making using BufferIsValid is not affected.
42-
* This should be set only if one is sure there will be no errors.
43-
* - plai 9/10/90
44-
*/
45-
#undef NO_BUFFERISVALID
46-
4739
#endif/* BUF_H */

‎src/include/storage/bufmgr.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: bufmgr.h,v 1.57 2001/11/10 23:51:14 tgl Exp $
10+
* $Id: bufmgr.h,v 1.58 2002/04/15 23:47:12 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -44,13 +44,6 @@ extern long *LocalRefCount;
4444
#defineBUFFER_LOCK_SHARE1
4545
#defineBUFFER_LOCK_EXCLUSIVE2
4646

47-
48-
/**********************************************************************
49-
50-
the rest is function defns in the bufmgr that are externally callable
51-
52-
**********************************************************************/
53-
5447
/*
5548
* These routines are beaten on quite heavily, hence the macroization.
5649
*/
@@ -150,7 +143,6 @@ extern long *LocalRefCount;
150143
BufferBlockPointers[(buffer) - 1] \
151144
)
152145

153-
154146
/*
155147
* prototypes for functions in bufmgr.c
156148
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp