Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ae35867a
Commit
ae35867a
authored
Mar 03, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove undo information from pg_controldata --- never used.
Florian G. Pflug
parent
0763a565
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
25 deletions
+11
-25
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+5
-11
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_controldata/pg_controldata.c
+1
-4
src/bin/pg_resetxlog/pg_resetxlog.c
src/bin/pg_resetxlog/pg_resetxlog.c
+1
-3
src/include/access/xlog_internal.h
src/include/access/xlog_internal.h
+2
-2
src/include/catalog/pg_control.h
src/include/catalog/pg_control.h
+2
-5
No files found.
src/backend/access/transam/xlog.c
View file @
ae35867a
...
...
@@ -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.26
4 2007/02/14 05:00:40
momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.26
5 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
,
...
...
src/bin/pg_controldata/pg_controldata.c
View file @
ae35867a
...
...
@@ -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.3
2 2006/12/08 19:50:53 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.3
3 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
"
),
...
...
src/bin/pg_resetxlog/pg_resetxlog.c
View file @
ae35867a
...
...
@@ -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.5
7 2007/02/10 14:58:55 petere
Exp $
* $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.5
8 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
;
...
...
src/include/access/xlog_internal.h
View file @
ae35867a
...
...
@@ -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.1
8 2007/01/05 22:19:51
momjian Exp $
* $PostgreSQL: pgsql/src/include/access/xlog_internal.h,v 1.1
9 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 0xD05
E
/* can be used as WAL version indicator */
#define XLOG_PAGE_MAGIC 0xD05
F
/* can be used as WAL version indicator */
typedef
struct
XLogPageHeaderData
{
...
...
src/include/catalog/pg_control.h
View file @
ae35867a
...
...
@@ -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.3
5 2007/01/05 22:19:52
momjian Exp $
* $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.3
6 2007/03/03 20:02:27
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -22,7 +22,7 @@
/* Version identifier for this pg_control format */
#define PG_CONTROL_VERSION 83
1
#define PG_CONTROL_VERSION 83
2
/*
* 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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment