diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 6c69eb6dd7..65220de600 100644
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 5975,5980 **** recoveryApplyDelay(XLogReaderState *record)
--- 5975,5984 ----
  	if (!reachedConsistency)
  		return false;
  
+ 	/* nothing to do if standby mode is not requested */
+ 	if (!StandbyModeRequested)
+ 		return false;
+ 
  	/*
  	 * Is it a COMMIT record?
  	 *
