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

Commit 876f78d

Browse files
committed
Fix capitalization in README.
Vik Fearing
1 parent e7f4097 commit 876f78d

File tree

1 file changed

+7
-7
lines changed
  • src/backend/storage/buffer

1 file changed

+7
-7
lines changed

src/backend/storage/buffer/README

+7-7
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ small limit value) whenever the buffer is pinned. (This requires only the
176176
buffer header spinlock, which would have to be taken anyway to increment the
177177
buffer reference count, so it's nearly free.)
178178

179-
The "clock hand" is a buffer index, NextVictimBuffer, that moves circularly
180-
through all the available buffers. NextVictimBuffer is protected by the
179+
The "clock hand" is a buffer index, nextVictimBuffer, that moves circularly
180+
through all the available buffers. nextVictimBuffer is protected by the
181181
BufFreelistLock.
182182

183183
The algorithm for a process that needs to obtain a victim buffer is:
@@ -189,8 +189,8 @@ is pinned or has a nonzero usage count, it cannot be used; ignore it and
189189
return to the start of step 2. Otherwise, pin the buffer, release
190190
BufFreelistLock, and return the buffer.
191191

192-
3. Otherwise, select the buffer pointed to by NextVictimBuffer, and
193-
circularly advance NextVictimBuffer for next time.
192+
3. Otherwise, select the buffer pointed to by nextVictimBuffer, and
193+
circularly advance nextVictimBuffer for next time.
194194

195195
4. If the selected buffer is pinned or has a nonzero usage count, it cannot
196196
be used. Decrement its usage count (if nonzero) and return to step 3 to
@@ -254,11 +254,11 @@ Background Writer's Processing
254254
The background writer is designed to write out pages that are likely to be
255255
recycled soon, thereby offloading the writing work from active backends.
256256
To do this, it scans forward circularly from the current position of
257-
NextVictimBuffer (which it does not change!), looking for buffers that are
257+
nextVictimBuffer (which it does not change!), looking for buffers that are
258258
dirty and not pinned nor marked with a positive usage count. It pins,
259259
writes, and releases any such buffer.
260260

261-
If we can assume that reading NextVictimBuffer is an atomic action, then
261+
If we can assume that reading nextVictimBuffer is an atomic action, then
262262
the writer doesn't even need to take the BufFreelistLock in order to look
263263
for buffers to write; it needs only to spinlock each buffer header for long
264264
enough to check the dirtybit. Even without that assumption, the writer
@@ -268,7 +268,7 @@ the contention cost of the writer compared to PG 8.0.)
268268

269269
During a checkpoint, the writer's strategy must be to write every dirty
270270
buffer (pinned or not!). We may as well make it start this scan from
271-
NextVictimBuffer, however, so that the first-to-be-written pages are the
271+
nextVictimBuffer, however, so that the first-to-be-written pages are the
272272
ones that backends might otherwise have to write for themselves soon.
273273

274274
The background writer takes shared content lock on a buffer while writing it

0 commit comments

Comments
 (0)