]> granicus.if.org Git - postgresql/commitdiff
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:26:36 +0000 (17:26 +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 040205760f711de4c36f66752ad96c4faaf94dff..7eea5fabaf5d4f64a40b59bb7a5a665297817319 100644 (file)
@@ -5489,7 +5489,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;