Fix compilation with WAL_DEBUG.
authorAndres Freund <andres@anarazel.de>
Thu, 7 Apr 2022 06:24:00 +0000 (23:24 -0700)
committerAndres Freund <andres@anarazel.de>
Thu, 7 Apr 2022 06:26:59 +0000 (23:26 -0700)
Broke with 5c279a6d350. But looks like it had been half-broken since
70e81861fad, because 'rmid' didn't refer to the current record's rmid anymore,
but to rmid from "Initialize resource managers" - a constant.

src/backend/access/transam/xlogrecovery.c

index 553919216795677d9bc8c41a9bf21bfb68acc253..79d38a837c4ecd6094a9f62fa644e31921ab86cd 100644 (file)
@@ -1634,8 +1634,8 @@ PerformWalRecovery(void)
 
 #ifdef WAL_DEBUG
            if (XLOG_DEBUG ||
-               (rmid == RM_XACT_ID && trace_recovery_messages <= DEBUG2) ||
-               (rmid != RM_XACT_ID && trace_recovery_messages <= DEBUG3))
+               (record->xl_rmid == RM_XACT_ID && trace_recovery_messages <= DEBUG2) ||
+               (record->xl_rmid != RM_XACT_ID && trace_recovery_messages <= DEBUG3))
            {
                StringInfoData buf;