aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-02-22 13:07:02 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-02-22 13:07:02 +0200
commitca60f0c422bd2c8538ee945d5f5e81eb498ddfde (patch)
tree29f92b3353c543fc07b81508c81ab394d511caa5 /src/backend/access/transam/xlog.c
parentee8b95e8c807f31220f31bcff445d1dcb20c28b4 (diff)
downloadpostgresql-ca60f0c422bd2c8538ee945d5f5e81eb498ddfde.tar.gz
postgresql-ca60f0c422bd2c8538ee945d5f5e81eb498ddfde.zip
Fix thinko in previous commit.
We must still initialize minRecoveryPoint if we start straight with archive recovery, e.g when recovering from a normal base backup taken with pg_start/stop_backup. Otherwise we never consider the system consistent.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index d47d0d916bf..92adc4e9fed 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6580,6 +6580,12 @@ StartupXLOG(void)
ControlFile->prevCheckPoint = ControlFile->checkPoint;
ControlFile->checkPoint = checkPointLoc;
ControlFile->checkPointCopy = checkPoint;
+ if (InArchiveRecovery)
+ {
+ /* initialize minRecoveryPoint if not set yet */
+ if (XLByteLT(ControlFile->minRecoveryPoint, checkPoint.redo))
+ ControlFile->minRecoveryPoint = checkPoint.redo;
+ }
/*
* Set backupStartPoint if we're starting recovery from a base backup.