Remove piece of code to zero out minRecoveryPoint when starting crash
authorHeikki Linnakangas <heikki@enterprisedb.com>
Mon, 8 Feb 2010 09:08:51 +0000 (09:08 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Mon, 8 Feb 2010 09:08:51 +0000 (09:08 +0000)
recovery. It's zeroed out whenever a checkpoint is written, so the only
scenario where the removed code did anything is when you kill archive
recovery, remove recovery.conf, and start up the server, so that it goes
into crash recovery instead. That's a "don't do that" scenario, but it
seems better to not clear minRecoveryPoint but instead update it like we
do in archive recovery, which is what will now happen.

src/backend/access/transam/xlog.c

index f6d7301379901d65936bcc18759abae8d0b38311..9405d51fed5fbb6bd278e1f14bd855d8415d1057 100644 (file)
@@ -5656,11 +5656,6 @@ StartupXLOG(void)
            if (XLByteLT(ControlFile->minRecoveryPoint, checkPoint.redo))
                ControlFile->minRecoveryPoint = checkPoint.redo;
        }
-       else
-       {
-           XLogRecPtr  InvalidXLogRecPtr = {0, 0};
-           ControlFile->minRecoveryPoint = InvalidXLogRecPtr;
-       }
        /*
         * set backupStartupPoint if we're starting archive recovery from a
         * base backup