If we don't have a backup-end-location, don't claim we've reached it.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 28 Nov 2012 09:45:30 +0000 (11:45 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 28 Nov 2012 13:14:27 +0000 (15:14 +0200)
This was apparently a typo, which caused recovery to think that it
immediately reached the end of backup, and allowed the database to start
up too early.

Reported by Jeff Janes. Backpatch to 9.2, where this code was introduced.

src/backend/access/transam/xlog.c

index 623704965f492e9d64e4bc6a7db5f7555c159eda..ff1973c8c8318317821a6a2f0efbef14776ba0c7 100644 (file)
@@ -5859,7 +5859,7 @@ StartupXLOG(void)
                                /* Pop the error context stack */
                                error_context_stack = errcallback.previous;
 
-                               if (!XLogRecPtrIsInvalid(ControlFile->backupStartPoint) &&
+                               if (!XLogRecPtrIsInvalid(ControlFile->backupEndPoint) &&
                                        XLByteLE(ControlFile->backupEndPoint, EndRecPtr))
                                {
                                        /*