From 4cea603128e53d47a8520b4f80332d95ec77589f Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas <heikki.linnakangas@iki.fi> Date: Mon, 8 Feb 2010 09:08:51 +0000 Subject: [PATCH] Remove piece of code to zero out minRecoveryPoint when starting crash 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 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 067827abeb6..4b429378dec 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.368 2010/02/08 04:33:53 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.369 2010/02/08 09:08:51 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -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 -- GitLab