Dept. of second thoughts: fix loop in BgBufferSync so that the exit when

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 7a315a09dc0f7a1f903b89022a2a833c1719145b
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-09-25T22:11:48Z
Releases: 8.3.0
Dept. of second thoughts: fix loop in BgBufferSync so that the exit when
bgwriter_lru_maxpages is exceeded leaves the loop variables in the
expected state.  In the original coding, we'd fail to advance
next_to_clean, causing that buffer to be probably-uselessly rechecked next
time, and also have an off-by-one idea of the number of buffers scanned.

Files

PathChange+/−
src/backend/storage/buffer/bufmgr.c modified +11 −10