diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 3253bdad57ce809864016dad94fa319bde375fdc..fc59a716b79ca46b651190ffe9b458c85b8f392b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.410 2010/05/13 11:15:38 sriggs Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.411 2010/05/14 07:11:48 sriggs Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -6009,6 +6009,7 @@ StartupXLOG(void)
 				running.oldestRunningXid = oldestActiveXID;
 				latestCompletedXid = checkPoint.nextXid;
 				TransactionIdRetreat(latestCompletedXid);
+				Assert(TransactionIdIsNormal(latestCompletedXid));
 				running.latestCompletedXid = latestCompletedXid;
 				running.xids = xids;
 
@@ -7825,6 +7826,7 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
 			running.oldestRunningXid = oldestActiveXID;
 			latestCompletedXid = checkPoint.nextXid;
 			TransactionIdRetreat(latestCompletedXid);
+			Assert(TransactionIdIsNormal(latestCompletedXid));
 			running.latestCompletedXid = latestCompletedXid;
 			running.xids = xids;
 
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 11b2809833897c7c5506ed1dbaf449723840c0e5..8cef305239f05a55b45d821b96335c5b3a2fc3d7 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.69 2010/05/13 11:15:38 sriggs Exp $
+ *	  $PostgreSQL: pgsql/src/backend/storage/ipc/procarray.c,v 1.70 2010/05/14 07:11:49 sriggs Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -470,11 +470,13 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	int i;
 
 	Assert(standbyState >= STANDBY_INITIALIZED);
+	Assert(TransactionIdIsValid(running->nextXid));
+	Assert(TransactionIdIsValid(running->oldestRunningXid));
+	Assert(TransactionIdIsNormal(running->latestCompletedXid));
 
 	/*
 	 * Remove stale transactions, if any.
 	 */
-	Assert(TransactionIdIsValid(running->oldestRunningXid));
 	ExpireOldKnownAssignedTransactionIds(running->oldestRunningXid);
 	StandbyReleaseOldLocks(running->oldestRunningXid);
 
@@ -679,6 +681,9 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
 	if (TransactionIdFollows(nextXid, ShmemVariableCache->nextXid))
 		ShmemVariableCache->nextXid = nextXid;
 
+	Assert(TransactionIdIsNormal(ShmemVariableCache->latestCompletedXid));
+	Assert(TransactionIdIsValid(ShmemVariableCache->nextXid));
+
 	LWLockRelease(ProcArrayLock);
 
 	elog(trace_recovery(DEBUG2), "running transaction data initialized");
@@ -1502,6 +1507,10 @@ GetRunningTransactionData(void)
 	LWLockRelease(XidGenLock);
 	LWLockRelease(ProcArrayLock);
 
+	Assert(TransactionIdIsValid(CurrentRunningXacts->nextXid));
+	Assert(TransactionIdIsValid(CurrentRunningXacts->oldestRunningXid));
+	Assert(TransactionIdIsNormal(CurrentRunningXacts->latestCompletedXid));
+
 	return CurrentRunningXacts;
 }
 
@@ -2317,6 +2326,8 @@ void
 RecordKnownAssignedTransactionIds(TransactionId xid)
 {
 	Assert(standbyState >= STANDBY_INITIALIZED);
+	Assert(TransactionIdIsValid(latestObservedXid));
+	Assert(TransactionIdIsValid(xid));
 
 	elog(trace_recovery(DEBUG4), "record known xact %u latestObservedXid %u",
 					xid, latestObservedXid);
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c
index a313ee50f1c01f40bcd1f80c18a293df1507f025..c9d88267b3846107672f1bc331bb55adc3c4b324 100644
--- a/src/backend/storage/ipc/standby.c
+++ b/src/backend/storage/ipc/standby.c
@@ -11,7 +11,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.22 2010/05/13 11:15:38 sriggs Exp $
+ *	  $PostgreSQL: pgsql/src/backend/storage/ipc/standby.c,v 1.23 2010/05/14 07:11:49 sriggs Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -717,6 +717,7 @@ standby_redo(XLogRecPtr lsn, XLogRecord *record)
 		running.xcnt = xlrec->xcnt;
 		running.subxid_overflow = xlrec->subxid_overflow;
 		running.nextXid = xlrec->nextXid;
+		running.latestCompletedXid = xlrec->latestCompletedXid;
 		running.oldestRunningXid = xlrec->oldestRunningXid;
 		running.xids = xlrec->xids;
 
@@ -731,8 +732,9 @@ standby_desc_running_xacts(StringInfo buf, xl_running_xacts *xlrec)
 {
 	int			i;
 
-	appendStringInfo(buf, " nextXid %u oldestRunningXid %u",
+	appendStringInfo(buf, " nextXid %u latestCompletedXid %u oldestRunningXid %u",
 					 xlrec->nextXid,
+					 xlrec->latestCompletedXid,
 					 xlrec->oldestRunningXid);
 	if (xlrec->xcnt > 0)
 	{
@@ -880,6 +882,7 @@ LogCurrentRunningXacts(RunningTransactions CurrRunningXacts)
 	xlrec.subxid_overflow = CurrRunningXacts->subxid_overflow;
 	xlrec.nextXid = CurrRunningXacts->nextXid;
 	xlrec.oldestRunningXid = CurrRunningXacts->oldestRunningXid;
+	xlrec.latestCompletedXid = CurrRunningXacts->latestCompletedXid;
 
 	/* Header */
 	rdata[0].data = (char *) (&xlrec);
@@ -902,19 +905,20 @@ LogCurrentRunningXacts(RunningTransactions CurrRunningXacts)
 
 	if (CurrRunningXacts->subxid_overflow)
 		elog(trace_recovery(DEBUG2),
-						"snapshot of %u running transactions overflowed (lsn %X/%X oldest xid %u next xid %u)",
+						"snapshot of %u running transactions overflowed (lsn %X/%X oldest xid %u latest complete %u next xid %u)",
 						CurrRunningXacts->xcnt,
 						recptr.xlogid, recptr.xrecoff,
 						CurrRunningXacts->oldestRunningXid,
+						CurrRunningXacts->latestCompletedXid,
 						CurrRunningXacts->nextXid);
 	else
 		elog(trace_recovery(DEBUG2),
-						"snapshot of %u running transaction ids (lsn %X/%X oldest xid %u next xid %u)",
+						"snapshot of %u running transaction ids (lsn %X/%X oldest xid %u latest complete %u next xid %u)",
 						CurrRunningXacts->xcnt,
 						recptr.xlogid, recptr.xrecoff,
 						CurrRunningXacts->oldestRunningXid,
+						CurrRunningXacts->latestCompletedXid,
 						CurrRunningXacts->nextXid);
-
 }
 
 /*