@@ -176,8 +176,8 @@ small limit value) whenever the buffer is pinned. (This requires only the
176176buffer header spinlock, which would have to be taken anyway to increment the
177177buffer 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
181181BufFreelistLock.
182182
183183The 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
189189return to the start of step 2. Otherwise, pin the buffer, release
190190BufFreelistLock, 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
1951954. If the selected buffer is pinned or has a nonzero usage count, it cannot
196196be used. Decrement its usage count (if nonzero) and return to step 3 to
@@ -254,11 +254,11 @@ Background Writer's Processing
254254The background writer is designed to write out pages that are likely to be
255255recycled soon, thereby offloading the writing work from active backends.
256256To 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
258258dirty and not pinned nor marked with a positive usage count. It pins,
259259writes, 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
262262the writer doesn't even need to take the BufFreelistLock in order to look
263263for buffers to write; it needs only to spinlock each buffer header for long
264264enough 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
269269During a checkpoint, the writer's strategy must be to write every dirty
270270buffer (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
272272ones that backends might otherwise have to write for themselves soon.
273273
274274The background writer takes shared content lock on a buffer while writing it
0 commit comments