77 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
10- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.61 2001/03/18 00:30:27 tgl Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.62 2001/03/18 20:18:59 tgl Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -2161,7 +2161,6 @@ BootStrapXLOG(void)
21612161 checkPoint .time = time (NULL );
21622162
21632163 ShmemVariableCache -> nextXid = checkPoint .nextXid ;
2164- ShmemVariableCache -> xidCount = 0 ;
21652164 ShmemVariableCache -> nextOid = checkPoint .nextOid ;
21662165 ShmemVariableCache -> oidCount = 0 ;
21672166
@@ -2317,7 +2316,6 @@ StartupXLOG(void)
23172316 elog (STOP , "Invalid NextTransactionId/NextOid" );
23182317
23192318 ShmemVariableCache -> nextXid = checkPoint .nextXid ;
2320- ShmemVariableCache -> xidCount = 0 ;
23212319 ShmemVariableCache -> nextOid = checkPoint .nextOid ;
23222320 ShmemVariableCache -> oidCount = 0 ;
23232321
@@ -2368,11 +2366,7 @@ StartupXLOG(void)
23682366 do
23692367 {
23702368 if (record -> xl_xid >= ShmemVariableCache -> nextXid )
2371- {
2372- /* This probably shouldn't happen... */
23732369 ShmemVariableCache -> nextXid = record -> xl_xid + 1 ;
2374- ShmemVariableCache -> xidCount = 0 ;
2375- }
23762370 if (XLOG_DEBUG )
23772371 {
23782372 char buf [8192 ];
@@ -2717,8 +2711,6 @@ CreateCheckPoint(bool shutdown)
27172711
27182712 SpinAcquire (XidGenLockId );
27192713 checkPoint .nextXid = ShmemVariableCache -> nextXid ;
2720- if (!shutdown )
2721- checkPoint .nextXid += ShmemVariableCache -> xidCount ;
27222714 SpinRelease (XidGenLockId );
27232715
27242716 SpinAcquire (OidGenLockId );
@@ -2803,21 +2795,6 @@ CreateCheckPoint(bool shutdown)
28032795 END_CRIT_SECTION ();
28042796}
28052797
2806- /*
2807- * Write a NEXTXID log record
2808- */
2809- void
2810- XLogPutNextXid (TransactionId nextXid )
2811- {
2812- XLogRecData rdata ;
2813-
2814- rdata .buffer = InvalidBuffer ;
2815- rdata .data = (char * )(& nextXid );
2816- rdata .len = sizeof (TransactionId );
2817- rdata .next = NULL ;
2818- (void ) XLogInsert (RM_XLOG_ID , XLOG_NEXTXID , & rdata );
2819- }
2820-
28212798/*
28222799 * Write a NEXTOID log record
28232800 */
@@ -2841,18 +2818,7 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
28412818{
28422819 uint8 info = record -> xl_info & ~XLR_INFO_MASK ;
28432820
2844- if (info == XLOG_NEXTXID )
2845- {
2846- TransactionId nextXid ;
2847-
2848- memcpy (& nextXid , XLogRecGetData (record ), sizeof (TransactionId ));
2849- if (ShmemVariableCache -> nextXid < nextXid )
2850- {
2851- ShmemVariableCache -> nextXid = nextXid ;
2852- ShmemVariableCache -> xidCount = 0 ;
2853- }
2854- }
2855- else if (info == XLOG_NEXTOID )
2821+ if (info == XLOG_NEXTOID )
28562822 {
28572823 Oid nextOid ;
28582824
@@ -2870,7 +2836,6 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
28702836 memcpy (& checkPoint , XLogRecGetData (record ), sizeof (CheckPoint ));
28712837 /* In a SHUTDOWN checkpoint, believe the counters exactly */
28722838 ShmemVariableCache -> nextXid = checkPoint .nextXid ;
2873- ShmemVariableCache -> xidCount = 0 ;
28742839 ShmemVariableCache -> nextOid = checkPoint .nextOid ;
28752840 ShmemVariableCache -> oidCount = 0 ;
28762841 }
@@ -2879,11 +2844,10 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
28792844 CheckPoint checkPoint ;
28802845
28812846 memcpy (& checkPoint , XLogRecGetData (record ), sizeof (CheckPoint ));
2882- /* In an ONLINE checkpoint, treat the counters like NEXTXID/ NEXTOID */
2847+ /* In an ONLINE checkpoint, treat the counters like NEXTOID */
28832848 if (ShmemVariableCache -> nextXid < checkPoint .nextXid )
28842849 {
28852850 ShmemVariableCache -> nextXid = checkPoint .nextXid ;
2886- ShmemVariableCache -> xidCount = 0 ;
28872851 }
28882852 if (ShmemVariableCache -> nextOid < checkPoint .nextOid )
28892853 {
@@ -2915,13 +2879,6 @@ xlog_desc(char *buf, uint8 xl_info, char* rec)
29152879 checkpoint -> nextOid ,
29162880 (info == XLOG_CHECKPOINT_SHUTDOWN ) ? "shutdown" : "online" );
29172881 }
2918- else if (info == XLOG_NEXTXID )
2919- {
2920- TransactionId nextXid ;
2921-
2922- memcpy (& nextXid , rec , sizeof (TransactionId ));
2923- sprintf (buf + strlen (buf ), "nextXid: %u" , nextXid );
2924- }
29252882 else if (info == XLOG_NEXTOID )
29262883 {
29272884 Oid nextOid ;
0 commit comments