Repair longstanding error in btree xlog replay: XLogReadBuffer should be
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Mar 2006 21:17:58 +0000 (21:17 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 28 Mar 2006 21:17:58 +0000 (21:17 +0000)
commite243ba23d3abf0c844659b87403fa9ee55340ee8
treea045a734ba3c12c53fb0468ac04f66d0664dae55
parentac2c2a457fa7408b53c04e2e82b8a85586d5463f
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