Oops, fix recoveryStopsBefore functions for regular commits.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 29 Jul 2014 14:16:59 +0000 (17:16 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 29 Jul 2014 14:19:43 +0000 (17:19 +0300)
Pointed out by Tom Lane. Backpatch to 9.4, the code was structured
differently in earlier branches and didn't have this mistake.

src/backend/access/transam/xlog.c

index 2bf49a8af8d37867d41c32a3968247171adb1cf5..fe184bde3b97338aca07af94fdf91313ea52ec1b 100644 (file)
@@ -5515,7 +5515,7 @@ recoveryStopsBefore(XLogRecord *record)
        isCommit = true;
        recordXid = record->xl_xid;
    }
-   if (record_info == XLOG_XACT_COMMIT_PREPARED)
+   else if (record_info == XLOG_XACT_COMMIT_PREPARED)
    {
        isCommit = true;
        recordXid = ((xl_xact_commit_prepared *) XLogRecGetData(record))->xid;