aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-04-18 08:27:19 -0400
committerRobert Haas <rhaas@postgresql.org>2011-04-18 08:27:19 -0400
commitaea1f24c2c25f01540435ded6ba611016392ef06 (patch)
tree5dae98316b11f0c9f9904b0e1bbc62375370124f /src
parentc29abc8b6f5334ac2f7046a33b233776ead12395 (diff)
downloadpostgresql-aea1f24c2c25f01540435ded6ba611016392ef06.tar.gz
postgresql-aea1f24c2c25f01540435ded6ba611016392ef06.zip
recoveryStopsHere() must check the resource manager ID.
Before commit c016ce728139be95bb0dc7c4e5640507334c2339, 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
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 742d8551f6a..b0e4c41d6f1 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5583,21 +5583,21 @@ recoveryStopsHere(XLogRecord *record, bool *includeThis)
if (record->xl_rmid != RM_XACT_ID && record->xl_rmid != RM_XLOG_ID)
return false;
record_info = record->xl_info & ~XLR_INFO_MASK;
- if (record_info == XLOG_XACT_COMMIT)
+ if (record->xl_rmid == RM_XACT_ID && record_info == XLOG_XACT_COMMIT)
{
xl_xact_commit *recordXactCommitData;
recordXactCommitData = (xl_xact_commit *) XLogRecGetData(record);
recordXtime = recordXactCommitData->xact_time;
}
- else if (record_info == XLOG_XACT_ABORT)
+ else if (record->xl_rmid == RM_XACT_ID && record_info == XLOG_XACT_ABORT)
{
xl_xact_abort *recordXactAbortData;
recordXactAbortData = (xl_xact_abort *) XLogRecGetData(record);
recordXtime = recordXactAbortData->xact_time;
}
- else if (record_info == XLOG_RESTORE_POINT)
+ else if (record->xl_rmid == RM_XLOG_ID && record_info == XLOG_RESTORE_POINT)
{
xl_restore_point *recordRestorePointData;