*** src/backend/access/transam/xlog.c_ 2019-09-09 22:24:29.000000000 +0200 --- src/backend/access/transam/xlog.c 2019-09-17 11:54:22.631882409 +0200 *************** *** 7279,7284 **** --- 7279,7307 ---- case RECOVERY_TARGET_ACTION_PROMOTE: break; } + } else if (recoveryTarget == RECOVERY_TARGET_TIME) + { + /* + * 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. */