Fix PITR msg for Abort Prepared

Started by Simon Riggsover 4 years ago2 messages
#1Simon Riggs
simon.riggs@enterprisedb.com
1 attachment(s)

PITR of Abort Prepared generates the wrong log message.

Fix attached

--
Simon Riggs http://www.EnterpriseDB.com/

Attachments:

pitr_recoveryStopsBefore_AbortPrepared.v1.patchapplication/octet-stream; name=pitr_recoveryStopsBefore_AbortPrepared.v1.patchDownload
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 1b3a3d9bea..c64ed561f9 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5808,7 +5808,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);
#2Michael Paquier
michael@paquier.xyz
In reply to: Simon Riggs (#1)
Re: Fix PITR msg for Abort Prepared

On Tue, Jun 29, 2021 at 11:03:30PM +0100, Simon Riggs wrote:

PITR of Abort Prepared generates the wrong log message.

Good catch! This is wrong since 4f1b890 and 9.5, so this needs a
backpatch all the way down.
--
Michael