diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 60e22d0..2d21fdf 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -922,8 +922,11 @@ RecordTransactionCommit(void) /* Get data needed for commit record */ nrels = smgrGetPendingDeletes(true, &rels, &haveNonTemp); nchildren = xactGetCommittedChildren(&children); - nmsgs = xactGetCommittedInvalidationMessages(&invalMessages, - &RelcacheInitFileInval); + if (wal_level == WAL_LEVEL_HOT_STANDBY) + nmsgs = xactGetCommittedInvalidationMessages(&invalMessages, + &RelcacheInitFileInval); + else + nmsgs = 0; /* * If we haven't been assigned an XID yet, we neither can, nor do we want