Skip to content

Commit aea1f24

Browse files
committed
recoveryStopsHere() must check the resource manager ID.
Before commit c016ce7, this wasn't needed, but now that multiple resource manager IDs can percolate down through here, we have to make sure we know which one we've got. Otherwise, we can confuse (for example) an XLOG_XACT_COMMIT record with an XLOG_CHECKPOINT_SHUTDOWN record. Review by Jaime Casanova
1 parent c29abc8 commit aea1f24

File tree

1 file changed

+3
-3
lines changed
  • src/backend/access/transam

1 file changed

+3
-3
lines changed

src/backend/access/transam/xlog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5583,21 +5583,21 @@ recoveryStopsHere(XLogRecord *record, bool *includeThis)
55835583
if (record->xl_rmid != RM_XACT_ID && record->xl_rmid != RM_XLOG_ID)
55845584
return false;
55855585
record_info = record->xl_info & ~XLR_INFO_MASK;
5586-
if (record_info == XLOG_XACT_COMMIT)
5586+
if (record->xl_rmid == RM_XACT_ID && record_info == XLOG_XACT_COMMIT)
55875587
{
55885588
xl_xact_commit *recordXactCommitData;
55895589

55905590
recordXactCommitData = (xl_xact_commit *) XLogRecGetData(record);
55915591
recordXtime = recordXactCommitData->xact_time;
55925592
}
5593-
else if (record_info == XLOG_XACT_ABORT)
5593+
else if (record->xl_rmid == RM_XACT_ID && record_info == XLOG_XACT_ABORT)
55945594
{
55955595
xl_xact_abort *recordXactAbortData;
55965596

55975597
recordXactAbortData = (xl_xact_abort *) XLogRecGetData(record);
55985598
recordXtime = recordXactAbortData->xact_time;
55995599
}
5600-
else if (record_info == XLOG_RESTORE_POINT)
5600+
else if (record->xl_rmid == RM_XLOG_ID && record_info == XLOG_RESTORE_POINT)
56015601
{
56025602
xl_restore_point *recordRestorePointData;
56035603

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy