aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/transam/xlog.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index a3b236ccec2..1c2384e8415 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.292.2.4 2008/05/13 20:54:02 mha Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.292.2.5 2008/10/30 04:06:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -4661,6 +4661,9 @@ exitArchiveRecovery(TimeLineID endTLI, uint32 endLogId, uint32 endLogSeg)
*
* 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.
*/
@@ -4692,12 +4695,12 @@ recoveryStopsHere(XLogRecord *record, bool *includeThis)
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)
{
@@ -4761,7 +4764,12 @@ recoveryStopsHere(XLogRecord *record, bool *includeThis)
recoveryStopXid,
timestamptz_to_str(recoveryStopTime))));
}
+
+ if (recoveryStopAfter)
+ recoveryLastXTime = recordXtime;
}
+ else
+ recoveryLastXTime = recordXtime;
return stopsHere;
}