]> granicus.if.org Git - postgresql/commit
Don't set reachedMinRecoveryPoint during crash recovery. In crash recovery,
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 9 Dec 2011 12:32:42 +0000 (14:32 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 9 Dec 2011 13:21:12 +0000 (15:21 +0200)
commit9f0d2bdc88630781485a17178e2b50e49ce70040
treeb8a85a2c176d85190c67b6533ab750fb0cd57ada
parent5d8a894e3095b2f602e901c19689f3176bf20543
Don't set reachedMinRecoveryPoint during crash recovery. In crash recovery,
we don't reach consistency before replaying all of the WAL. Rename the
variable to reachedConsistency, to make its intention clearer.

In master, that was an active bug because of the recent patch to
immediately PANIC if a reference to a missing page is found in WAL after
reaching consistency, as Tom Lane's test case demonstrated. In 9.1 and 9.0,
the only consequence was a misleading "consistent recovery state reached at
%X/%X" message in the log at the beginning of crash recovery (the database
is not consistent at that point yet). In 8.4, the log message was not
printed in crash recovery, even though there was a similar
reachedMinRecoveryPoint local variable that was also set early. So,
backpatch to 9.1 and 9.0.
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogutils.c
src/include/access/xlog.h