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
d561430b
Commit
d561430b
authored
Jun 03, 2010
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On clean shutdown during recovery, don't warn about possible corruption.
Fujii Masao. Review by Heikki Linnakangas and myself.
parent
f0c437cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+15
-1
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_controldata/pg_controldata.c
+3
-1
src/include/catalog/pg_control.h
src/include/catalog/pg_control.h
+2
-1
No files found.
src/backend/access/transam/xlog.c
View file @
d561430b
...
...
@@ -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.41
5 2010/06/02 09:28:44 heikki
Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.41
6 2010/06/03 03:19:59 rhaas
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -5661,6 +5661,10 @@ StartupXLOG(void)
ereport
(
LOG
,
(
errmsg
(
"database system was shut down at %s"
,
str_time
(
ControlFile
->
time
))));
else
if
(
ControlFile
->
state
==
DB_SHUTDOWNED_IN_RECOVERY
)
ereport
(
LOG
,
(
errmsg
(
"database system was shut down in recovery at %s"
,
str_time
(
ControlFile
->
time
))));
else
if
(
ControlFile
->
state
==
DB_SHUTDOWNING
)
ereport
(
LOG
,
(
errmsg
(
"database system shutdown was interrupted; last known up at %s"
,
...
...
@@ -7548,6 +7552,14 @@ CreateRestartPoint(int flags)
lastCheckPoint
.
redo
.
xlogid
,
lastCheckPoint
.
redo
.
xrecoff
)));
UpdateMinRecoveryPoint
(
InvalidXLogRecPtr
,
true
);
if
(
flags
&
CHECKPOINT_IS_SHUTDOWN
)
{
LWLockAcquire
(
ControlFileLock
,
LW_EXCLUSIVE
);
ControlFile
->
state
=
DB_SHUTDOWNED_IN_RECOVERY
;
ControlFile
->
time
=
(
pg_time_t
)
time
(
NULL
);
UpdateControlFile
();
LWLockRelease
(
ControlFileLock
);
}
LWLockRelease
(
CheckpointLock
);
return
false
;
}
...
...
@@ -7585,6 +7597,8 @@ CreateRestartPoint(int flags)
ControlFile
->
checkPoint
=
lastCheckPointRecPtr
;
ControlFile
->
checkPointCopy
=
lastCheckPoint
;
ControlFile
->
time
=
(
pg_time_t
)
time
(
NULL
);
if
(
flags
&
CHECKPOINT_IS_SHUTDOWN
)
ControlFile
->
state
=
DB_SHUTDOWNED_IN_RECOVERY
;
UpdateControlFile
();
}
LWLockRelease
(
ControlFileLock
);
...
...
src/bin/pg_controldata/pg_controldata.c
View file @
d561430b
...
...
@@ -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.
49 2010/04/28 19:38:49 tgl
Exp $
* $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.
50 2010/06/03 03:20:00 rhaas
Exp $
*/
/*
...
...
@@ -57,6 +57,8 @@ dbState(DBState state)
return
_
(
"starting up"
);
case
DB_SHUTDOWNED
:
return
_
(
"shut down"
);
case
DB_SHUTDOWNED_IN_RECOVERY
:
return
_
(
"shut down in recovery"
);
case
DB_SHUTDOWNING
:
return
_
(
"shutting down"
);
case
DB_IN_CRASH_RECOVERY
:
...
...
src/include/catalog/pg_control.h
View file @
d561430b
...
...
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.5
4 2010/04/28 16:10:43 heikki
Exp $
* $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.5
5 2010/06/03 03:20:00 rhaas
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -65,6 +65,7 @@ typedef enum DBState
{
DB_STARTUP
=
0
,
DB_SHUTDOWNED
,
DB_SHUTDOWNED_IN_RECOVERY
,
DB_SHUTDOWNING
,
DB_IN_CRASH_RECOVERY
,
DB_IN_ARCHIVE_RECOVERY
,
...
...
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