*
* Returns TRUE if we are stopping, FALSE otherwise. On TRUE return,
* *includeThis is set TRUE if we should apply this record before stopping.
+ *
+ * We also track the timestamp of the latest applied COMMIT/ABORT record
+ * in recoveryLastXTime, for logging purposes.
* Also, some information is saved in recoveryStopXid et al for use in
* annotating the new timeline's history file.
*/
else
return false;
- /* Remember the most recent COMMIT/ABORT time for logging purposes */
- recoveryLastXTime = recordXtime;
-
/* Do we have a PITR target at all? */
if (!recoveryTarget)
+ {
+ recoveryLastXTime = recordXtime;
return false;
+ }
if (recoveryTargetExact)
{
recoveryStopXid,
timestamptz_to_str(recoveryStopTime))));
}
+
+ if (recoveryStopAfter)
+ recoveryLastXTime = recordXtime;
}
+ else
+ recoveryLastXTime = recordXtime;
return stopsHere;
}