diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-02-22 13:07:02 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-02-22 13:07:02 +0200 |
commit | ca60f0c422bd2c8538ee945d5f5e81eb498ddfde (patch) | |
tree | 29f92b3353c543fc07b81508c81ab394d511caa5 /src/backend/access/transam/xlog.c | |
parent | ee8b95e8c807f31220f31bcff445d1dcb20c28b4 (diff) | |
download | postgresql-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.c | 6 |
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. |