Fix incorrect PITR message for transaction ROLLBACK PREPARED
authorMichael Paquier <[email protected]>
Wed, 30 Jun 2021 02:49:36 +0000 (11:49 +0900)
committerMichael Paquier <[email protected]>
Wed, 30 Jun 2021 02:49:36 +0000 (11:49 +0900)
Reaching PITR on such a transaction would cause the generation of a LOG
message mentioning a transaction committed, not aborted.

Oversight in 4f1b890.

Author: Simon Riggs
Discussion: https://postgr.es/m/CANbhV-GJ6KijeCgdOrxqMCQ+C8QiK657EMhCy4csjrPcEUFv_Q@mail.gmail.com
Backpatch-through: 9.6

src/backend/access/transam/xlog.c

index 7bcb3087e2769b879f243040ac6ee13f7562ea8a..14f1a1e26f5c79df260ea3bd88544397ff30df0d 100644 (file)
@@ -5551,7 +5551,7 @@ recoveryStopsBefore(XLogReaderState *record)
        xl_xact_abort *xlrec = (xl_xact_abort *) XLogRecGetData(record);
        xl_xact_parsed_abort parsed;
 
-       isCommit = true;
+       isCommit = false;
        ParseAbortRecord(XLogRecGetInfo(record),
                         xlrec,
                         &parsed);