When telling the bgwriter that we need a checkpoint because too much xlog
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Oct 2007 19:39:59 +0000 (19:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Oct 2007 19:39:59 +0000 (19:39 +0000)
commit6891e87323eca37a26256585e2200d808fd3302c
treef22e5da548b8f701cdfa5f291ceecc2a8858d686
parent0eeada81e6de2b941b17828810787228056b55ea
When telling the bgwriter that we need a checkpoint because too much xlog
has been consumed, recheck against the latest value of RedoRecPtr before
really sending the signal.  This avoids useless checkpoint activity if
XLogWrite is executed when we have a very stale local copy of RedoRecPtr.
The potential for useless checkpoint is very much worse in 8.3 because of
the walwriter process (which never does XLogInsert), so while this behavior
was intentional, it needs to be changed.  Per report from Itagaki Takahiro.
src/backend/access/transam/xlog.c