]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Remove undo information from pg_controldata --- never used.
authorBruce Momjian <bruce@momjian.us>
Sat, 3 Mar 2007 20:02:27 +0000 (20:02 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 3 Mar 2007 20:02:27 +0000 (20:02 +0000)
Florian G. Pflug

src/backend/access/transam/xlog.c
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_resetxlog/pg_resetxlog.c
src/include/access/xlog_internal.h
src/include/catalog/pg_control.h

index cd62220c0f2e3ee81488e82a15edec4085c49ef7..07e95057d0e281d6d4a246b164ee745832f612eb 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.264 2007/02/14 05:00:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.265 2007/03/03 20:02:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -4039,7 +4039,6 @@ BootStrapXLOG(void)
        /* Set up information for the initial checkpoint record */
        checkPoint.redo.xlogid = 0;
        checkPoint.redo.xrecoff = SizeOfXLogLongPHD;
-       checkPoint.undo = checkPoint.redo;
        checkPoint.ThisTimeLineID = ThisTimeLineID;
        checkPoint.nextXidEpoch = 0;
        checkPoint.nextXid = FirstNormalTransactionId;
@@ -4698,9 +4697,8 @@ StartupXLOG(void)
        wasShutdown = (record->xl_info == XLOG_CHECKPOINT_SHUTDOWN);
 
        ereport(LOG,
-        (errmsg("redo record is at %X/%X; undo record is at %X/%X; shutdown %s",
+        (errmsg("redo record is at %X/%X; shutdown %s",
                         checkPoint.redo.xlogid, checkPoint.redo.xrecoff,
-                        checkPoint.undo.xlogid, checkPoint.undo.xrecoff,
                         wasShutdown ? "TRUE" : "FALSE")));
        ereport(LOG,
                        (errmsg("next transaction ID: %u/%u; next OID: %u",
@@ -4730,20 +4728,17 @@ StartupXLOG(void)
        if (XLByteLT(RecPtr, checkPoint.redo))
                ereport(PANIC,
                                (errmsg("invalid redo in checkpoint record")));
-       if (checkPoint.undo.xrecoff == 0)
-               checkPoint.undo = RecPtr;
 
        /*
         * Check whether we need to force recovery from WAL.  If it appears to
         * have been a clean shutdown and we did not have a recovery.conf file,
         * then assume no recovery needed.
         */
-       if (XLByteLT(checkPoint.undo, RecPtr) ||
-               XLByteLT(checkPoint.redo, RecPtr))
+       if (XLByteLT(checkPoint.redo, RecPtr))
        {
                if (wasShutdown)
                        ereport(PANIC,
-                               (errmsg("invalid redo/undo record in shutdown checkpoint")));
+                               (errmsg("invalid redo record in shutdown checkpoint")));
                InRecovery = true;
        }
        else if (ControlFile->state != DB_SHUTDOWNED)
@@ -5850,10 +5845,9 @@ xlog_desc(StringInfo buf, uint8 xl_info, char *rec)
        {
                CheckPoint *checkpoint = (CheckPoint *) rec;
 
-               appendStringInfo(buf, "checkpoint: redo %X/%X; undo %X/%X; "
+               appendStringInfo(buf, "checkpoint: redo %X/%X; "
                                                 "tli %u; xid %u/%u; oid %u; multi %u; offset %u; %s",
                                                 checkpoint->redo.xlogid, checkpoint->redo.xrecoff,
-                                                checkpoint->undo.xlogid, checkpoint->undo.xrecoff,
                                                 checkpoint->ThisTimeLineID,
                                                 checkpoint->nextXidEpoch, checkpoint->nextXid,
                                                 checkpoint->nextOid,
index 6805af615364da667380f1d836d5fa2d70b0d2e7..ad2d08fd930defb8e00bb6ea7c165ffa6d750c0e 100644 (file)
@@ -6,7 +6,7 @@
  * copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
  * licence: BSD
  *
- * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.32 2006/12/08 19:50:53 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.33 2007/03/03 20:02:27 momjian Exp $
  */
 #include "postgres.h"
 
@@ -168,9 +168,6 @@ main(int argc, char *argv[])
        printf(_("Latest checkpoint's REDO location:    %X/%X\n"),
                   ControlFile.checkPointCopy.redo.xlogid,
                   ControlFile.checkPointCopy.redo.xrecoff);
-       printf(_("Latest checkpoint's UNDO location:    %X/%X\n"),
-                  ControlFile.checkPointCopy.undo.xlogid,
-                  ControlFile.checkPointCopy.undo.xrecoff);
        printf(_("Latest checkpoint's TimeLineID:       %u\n"),
                   ControlFile.checkPointCopy.ThisTimeLineID);
        printf(_("Latest checkpoint's NextXID:          %u/%u\n"),
index 1cb7fef0596036ff92dcd193e85bfc064e5cea5e..c272fc432d0887b3fe53725e71e43f126e9a8d30 100644 (file)
@@ -23,7 +23,7 @@
  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.57 2007/02/10 14:58:55 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.58 2007/03/03 20:02:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -464,7 +464,6 @@ GuessControlValues(void)
 
        ControlFile.checkPointCopy.redo.xlogid = 0;
        ControlFile.checkPointCopy.redo.xrecoff = SizeOfXLogLongPHD;
-       ControlFile.checkPointCopy.undo = ControlFile.checkPointCopy.redo;
        ControlFile.checkPointCopy.ThisTimeLineID = 1;
        ControlFile.checkPointCopy.nextXidEpoch = 0;
        ControlFile.checkPointCopy.nextXid = (TransactionId) 514;       /* XXX */
@@ -600,7 +599,6 @@ RewriteControlFile(void)
        ControlFile.checkPointCopy.redo.xlogid = newXlogId;
        ControlFile.checkPointCopy.redo.xrecoff =
                newXlogSeg * XLogSegSize + SizeOfXLogLongPHD;
-       ControlFile.checkPointCopy.undo = ControlFile.checkPointCopy.redo;
        ControlFile.checkPointCopy.time = time(NULL);
 
        ControlFile.state = DB_SHUTDOWNED;
index 217efb4a7c555cdcfba4bd152da55777b376d78f..e2ff478149f4adf30648ac5d0b33fbc9cb03717f 100644 (file)
@@ -11,7 +11,7 @@
  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/access/xlog_internal.h,v 1.18 2007/01/05 22:19:51 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/xlog_internal.h,v 1.19 2007/03/03 20:02:27 momjian Exp $
  */
 #ifndef XLOG_INTERNAL_H
 #define XLOG_INTERNAL_H
@@ -71,7 +71,7 @@ typedef struct XLogContRecord
 /*
  * Each page of XLOG file has a header like this:
  */
-#define XLOG_PAGE_MAGIC 0xD05E /* can be used as WAL version indicator */
+#define XLOG_PAGE_MAGIC 0xD05F /* can be used as WAL version indicator */
 
 typedef struct XLogPageHeaderData
 {
index 1cd70c093549df79eb2a4ede8f455f70df8bca59..ce4e5c2dc5210cebe484a5185776ad8865ad8355 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.35 2007/01/05 22:19:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.36 2007/03/03 20:02:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,7 +22,7 @@
 
 
 /* Version identifier for this pg_control format */
-#define PG_CONTROL_VERSION     831
+#define PG_CONTROL_VERSION     832
 
 /*
  * Body of CheckPoint XLOG records.  This is declared here because we keep
@@ -32,9 +32,6 @@ typedef struct CheckPoint
 {
        XLogRecPtr      redo;                   /* next RecPtr available when we began to
                                                                 * create CheckPoint (i.e. REDO start point) */
-       XLogRecPtr      undo;                   /* first record of oldest in-progress
-                                                                * transaction when we started (i.e. UNDO end
-                                                                * point) */
        TimeLineID      ThisTimeLineID; /* current TLI */
        uint32          nextXidEpoch;   /* higher-order bits of nextXid */
        TransactionId nextXid;          /* next free XID */