Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 95a03e9

Browse files
committed
Another round of code cleanup on bufmgr. Use BM_VALID flag to keep track
of whether we have successfully read data into a buffer; this makes the error behavior a bit more transparent (IMHO anyway), and also makes it work correctly for local buffers which don't use Start/TerminateBufferIO. Collapse three separate functions for writing a shared buffer into one. This overlaps a bit with cleanups that Neil proposed awhile back, but seems not to have committed yet.
1 parent aeee856 commit 95a03e9

File tree

6 files changed

+326
-426
lines changed

6 files changed

+326
-426
lines changed

src/backend/storage/buffer/buf_init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/buffer/buf_init.c,v 1.63 2004/04/19 23:27:17 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/buffer/buf_init.c,v 1.64 2004/04/21 18:06:30 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -133,11 +133,11 @@ InitBufferPool(void)
133133

134134
buf->bufNext = i + 1;
135135

136-
CLEAR_BUFFERTAG(&(buf->tag));
136+
CLEAR_BUFFERTAG(buf->tag);
137137
buf->buf_id = i;
138138

139139
buf->data = MAKE_OFFSET(block);
140-
buf->flags = (BM_DELETED | BM_VALID);
140+
buf->flags = 0;
141141
buf->refcount = 0;
142142
buf->io_in_progress_lock = LWLockAssign();
143143
buf->cntx_lock = LWLockAssign();

0 commit comments

Comments
 (0)