1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Add many new Asserts in code and fix simple bug that slipped through

without them, related to previous commit. Report by Bruce Momjian.
This commit is contained in:
Simon Riggs
2010-05-14 07:11:49 +00:00
parent 88fba7089e
commit fd34374b17
3 changed files with 25 additions and 8 deletions

View File

@ -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;