]> granicus.if.org Git - postgresql/commitdiff
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:19 +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 3d6046eacfd287124ef2dd7541e33de40384ca1f..9328ad38f4d107714e068d910e09bfd1a3d5b551 100644 (file)
@@ -6763,7 +6763,7 @@ StartupXLOG(void)
                                /* Pop the error context stack */
                                error_context_stack = errcontext.previous;
 
-                               if (!XLogRecPtrIsInvalid(ControlFile->backupStartPoint) &&
+                               if (!XLogRecPtrIsInvalid(ControlFile->backupEndPoint) &&
                                        XLByteLE(ControlFile->backupEndPoint, EndRecPtr))
                                {
                                        /*