From: Heikki Linnakangas Date: Tue, 29 Jul 2014 14:16:59 +0000 (+0300) Subject: Oops, fix recoveryStopsBefore functions for regular commits. X-Git-Tag: REL9_5_ALPHA1~1673 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60d931827b0c37fbce74d04e45d0220d57ddd06a;p=postgresql Oops, fix recoveryStopsBefore functions for regular commits. Pointed out by Tom Lane. Backpatch to 9.4, the code was structured differently in earlier branches and didn't have this mistake. --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 2bf49a8af8..fe184bde3b 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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;