Repair longstanding error in btree xlog replay: XLogReadBuffer should be
authorTom Lane <[email protected]>
Tue, 28 Mar 2006 21:17:44 +0000 (21:17 +0000)
committerTom Lane <[email protected]>
Tue, 28 Mar 2006 21:17:44 +0000 (21:17 +0000)
commitb5c5c5d2838d2a9e80e58000138c50ed0aa0eff0
tree35eb25de5c7a007c4c9bb80305db6b81f3249e24
parent8931dbf52af40e862fb649c4bb0d2c1b877a0320
Repair longstanding error in btree xlog replay: XLogReadBuffer should be
passed extend = true whenever we are reading a page we intend to reinitialize
completely, even if we think the page "should exist".  This is because it
might indeed not exist, if the relation got truncated sometime after the
current xlog record was made and before the crash we're trying to recover
from.  These two thinkos appear to explain both of the old bug reports
discussed here:
http://archives.postgresql.org/pgsql-hackers/2005-05/msg01369.php
src/backend/access/nbtree/nbtxlog.c