diff options
| author | Heikki Linnakangas | 2013-02-22 11:07:02 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2013-02-22 11:12:43 +0000 |
| commit | 6c4f6664b201bea77eb6e3f813559e3911a5ef35 (patch) | |
| tree | ae2d966d6d742a473e4eed8b291cfe41dac56c38 /src/backend/access | |
| parent | 6d06049493862f7f6b639035198fc817949723ae (diff) | |
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')
| -rw-r--r-- | src/backend/access/transam/xlog.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 29d1f960c14..d960bbcc208 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5265,6 +5265,15 @@ StartupXLOG(void) ControlFile->prevCheckPoint = ControlFile->checkPoint; ControlFile->checkPoint = checkPointLoc; ControlFile->checkPointCopy = checkPoint; + if (InArchiveRecovery) + { + /* initialize minRecoveryPoint if not set yet */ + if (ControlFile->minRecoveryPoint < checkPoint.redo) + { + ControlFile->minRecoveryPoint = checkPoint.redo; + ControlFile->minRecoveryPointTLI = checkPoint.ThisTimeLineID; + } + } /* * Set backupStartPoint if we're starting recovery from a base backup. |
