diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 2e3cc51006..566e2eb092 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7289,6 +7289,32 @@ StartupXLOG(void)
                                        case RECOVERY_TARGET_ACTION_PROMOTE:
                                                break;
                                }
+                       }       else if (recoveryTarget == RECOVERY_TARGET_TIME ||
+                                                recoveryTarget == RECOVERY_TARGET_XID  ||
+                                                recoveryTarget == RECOVERY_TARGET_NAME ||
+                                                recoveryTarget == RECOVERY_TARGET_LSN)
+                       {
+                               /*
+                                * Stop point not reached and next WAL could not be read
+                                * Report transaction log time and pause recovery
+                                */
+                               switch (recoveryTargetAction)
+                               {
+                                       case RECOVERY_TARGET_ACTION_PAUSE:
+                                               ereport(LOG,
+                                                               (errmsg("Recovery target not reached but next WAL record culd not be read")));
+                                               ereport(LOG,
+                                                               (errmsg("redo done at %X/%X",
+                                                                               (uint32)(ReadRecPtr >> 32), (uint32)ReadRecPtr)));
+                                               xtime = GetLatestXTime();
+                                               if (xtime)
+                                                       ereport(LOG,
+                                                                       (errmsg("last completed transaction was at log time %s",
+                                                                                       timestamptz_to_str(xtime))));
+                                               SetRecoveryPause(true);
+                                               recoveryPausesHere();
+                                               break;
+                               }
                        }
 
                        /* Allow resource managers to do any required cleanup. */

