diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-12-30 08:37:21 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-12-30 08:37:21 +0000 |
commit | ff1e1e45b913e7c94a9a972645dbd016cf6368fc (patch) | |
tree | 8ae50e3ab96114243bace7e24454422b60bb8dbe | |
parent | 4847d5956c58faad15d03926e2cf97d59822a6ae (diff) | |
download | postgresql-ff1e1e45b913e7c94a9a972645dbd016cf6368fc.tar.gz postgresql-ff1e1e45b913e7c94a9a972645dbd016cf6368fc.zip |
Reset minRecoveryPoint at checkpoints, so that we don't uselessly update
it in the control file at crash recovery following an archive recovery.
Per Fujii Masao and subsequent discussion.
-rw-r--r-- | src/backend/access/transam/xlog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index b861a76ee4f..e1bfad56402 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.354 2009/12/19 01:32:33 sriggs Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.355 2009/12/30 08:37:21 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -6882,6 +6882,8 @@ CreateCheckPoint(int flags) ControlFile->checkPoint = ProcLastRecPtr; ControlFile->checkPointCopy = checkPoint; ControlFile->time = (pg_time_t) time(NULL); + /* crash recovery should always recover to the end of WAL */ + MemSet(&ControlFile->minRecoveryPoint, 0, sizeof(XLogRecPtr)); UpdateControlFile(); LWLockRelease(ControlFileLock); |