From 3536b851adb275e2f49a80030111e84abc0736ba Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 6 Apr 2022 23:24:00 -0700 Subject: [PATCH] Fix compilation with WAL_DEBUG. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c index 5539192167..79d38a837c 100644 --- a/src/backend/access/transam/xlogrecovery.c +++ b/src/backend/access/transam/xlogrecovery.c @@ -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;