Fix incorrect PITR message for transaction ROLLBACK PREPARED
authorMichael Paquier <[email protected]>
Wed, 30 Jun 2021 02:49:29 +0000 (11:49 +0900)
committerMichael Paquier <[email protected]>
Wed, 30 Jun 2021 02:49:29 +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 a5354c90ba98972bce303e1d1bcd2fefe572bee4..b3cc055bab8257bf4f51ccb44fdb10dd5695a1da 100644 (file)
@@ -5765,7 +5765,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);