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
e8ff221d
Commit
e8ff221d
authored
Nov 21, 2000
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OID bootstraping.
parent
b31e83f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
32 deletions
+32
-32
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+5
-6
src/backend/bootstrap/bootstrap.c
src/backend/bootstrap/bootstrap.c
+27
-26
No files found.
src/backend/access/transam/xlog.c
View file @
e8ff221d
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.
29 2000/11/21 02:11:0
6 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.
30 2000/11/21 09:39:5
6 vadim Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -251,7 +251,7 @@ XLogInsert(RmgrId rmid, uint8 info, char *hdr, uint32 hdrlen, char *buf, uint32
if
(
len
==
0
||
len
>
MAXLOGRECSZ
)
elog
(
STOP
,
"XLogInsert: invalid record len %u"
,
len
);
if
(
IsBootstrapProcessingMode
())
if
(
IsBootstrapProcessingMode
()
&&
rmid
!=
RM_XLOG_ID
)
{
RecPtr
.
xlogid
=
0
;
RecPtr
.
xrecoff
=
SizeOfXLogPHD
;
/* start of 1st checkpoint record */
...
...
@@ -506,7 +506,7 @@ XLogFlush(XLogRecPtr record)
fflush
(
stderr
);
}
if
(
I
sBootstrapProcessingMode
()
||
I
nRedo
)
if
(
InRedo
)
return
;
if
(
XLByteLE
(
record
,
LgwrResult
.
Flush
))
return
;
...
...
@@ -1326,8 +1326,7 @@ BootStrapXLOG()
#endif
memset
(
buffer
,
0
,
BLCKSZ
);
ControlFile
=
(
ControlFileData
*
)
buffer
;
memset
(
ControlFile
,
0
,
BLCKSZ
);
ControlFile
->
logId
=
0
;
ControlFile
->
logSeg
=
1
;
ControlFile
->
checkPoint
=
checkPoint
.
redo
;
...
...
@@ -1337,7 +1336,7 @@ BootStrapXLOG()
ControlFile
->
relseg_size
=
RELSEG_SIZE
;
ControlFile
->
catalog_version_no
=
CATALOG_VERSION_NO
;
if
(
write
(
fd
,
buffer
,
BLCKSZ
)
!=
BLCKSZ
)
if
(
write
(
fd
,
ControlFile
,
BLCKSZ
)
!=
BLCKSZ
)
elog
(
STOP
,
"BootStrapXLOG failed to write control file: %d"
,
errno
);
if
(
fsync
(
fd
)
!=
0
)
...
...
src/backend/bootstrap/bootstrap.c
View file @
e8ff221d
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.9
8 2000/11/09 11:25:58
vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.9
9 2000/11/21 09:39:57
vadim Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -341,32 +341,33 @@ BootstrapMain(int argc, char *argv[])
/*
* XLOG operations
*/
if
(
xlogop
!=
BS_XLOG_NOP
)
snprintf
(
XLogDir
,
MAXPGPATH
,
"%s/pg_xlog"
,
DataDir
);
snprintf
(
ControlFilePath
,
MAXPGPATH
,
"%s/global/pg_control"
,
DataDir
);
SetProcessingMode
(
NormalProcessing
);
if
(
xlogop
==
BS_XLOG_NOP
)
StartupXLOG
();
else
if
(
xlogop
==
BS_XLOG_BOOTSTRAP
)
{
snprintf
(
XLogDir
,
MAXPGPATH
,
"%s/pg_xlog"
,
DataDir
);
snprintf
(
ControlFilePath
,
MAXPGPATH
,
"%s/global/pg_control"
,
DataDir
);
if
(
xlogop
==
BS_XLOG_BOOTSTRAP
)
BootStrapXLOG
();
else
BootStrapXLOG
();
StartupXLOG
();
}
else
{
if
(
xlogop
==
BS_XLOG_CHECKPOINT
)
{
SetProcessingMode
(
NormalProcessing
);
if
(
xlogop
==
BS_XLOG_STARTUP
)
StartupXLOG
();
else
if
(
xlogop
==
BS_XLOG_CHECKPOINT
)
{
#ifdef XLOG
extern
void
CreateDummyCaches
(
void
);
CreateDummyCaches
();
#endif
CreateCheckPoint
(
false
);
}
else
if
(
xlogop
==
BS_XLOG_SHUTDOWN
)
ShutdownXLOG
();
else
elog
(
STOP
,
"Unsupported XLOG op %d"
,
xlogop
);
proc_exit
(
0
);
extern
void
CreateDummyCaches
(
void
);
CreateDummyCaches
();
CreateCheckPoint
(
false
);
}
else
if
(
xlogop
==
BS_XLOG_STARTUP
)
StartupXLOG
();
else
if
(
xlogop
==
BS_XLOG_SHUTDOWN
)
ShutdownXLOG
();
else
elog
(
STOP
,
"Unsupported XLOG op %d"
,
xlogop
);
proc_exit
(
0
);
}
SetProcessingMode
(
BootstrapProcessing
);
/*
* backend initialization
...
...
@@ -407,9 +408,9 @@ BootstrapMain(int argc, char *argv[])
*/
Int_yyparse
();
#ifdef XLOG
FlushBufferPool
(
);
#endif
SetProcessingMode
(
NormalProcessing
);
CreateCheckPoint
(
true
);
SetProcessingMode
(
BootstrapProcessing
);
/* clean up processing */
StartTransactionCommand
();
...
...
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