OSDN Git Service

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