diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-12-30 08:37:23 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-12-30 08:37:23 +0000 |
commit | cae9c0d8c14e0997aa587350d13981ba7827c1d5 (patch) | |
tree | ebaab81c34f7c6730280b47588ba17bd13779e80 /src | |
parent | eb63765a389b020a86fd04cf9333027d37b8f572 (diff) | |
download | postgresql-cae9c0d8c14e0997aa587350d13981ba7827c1d5.tar.gz postgresql-cae9c0d8c14e0997aa587350d13981ba7827c1d5.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.
Diffstat (limited to 'src')
-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 212d5a416ec..5d18e1a3efa 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.345.2.5 2009/09/13 18:32:17 heikki Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.345.2.6 2009/12/30 08:37:23 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -6659,6 +6659,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); |