Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2785491

Browse files
committed
If a shutdown request comes in while we're still starting up, don't
service it until after we execute SetThisStartUpID(). Else shutdownprocess will write the wrong SUI into the shutdown checkpoint, whichseems likely to be trouble --- although I've not quite figured outhow significant it really is.
1 parent80d6a27 commit2785491

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.306 2003/01/25 05:19:46 tgl Exp $
40+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.307 2003/02/23 04:48:19 tgl Exp $
4141
*
4242
* NOTES
4343
*
@@ -1636,7 +1636,26 @@ reaper(SIGNAL_ARGS)
16361636
ExitPostmaster(1);
16371637
}
16381638
StartupPID=0;
1639+
1640+
/*
1641+
* Startup succeeded - remember its ID and RedoRecPtr.
1642+
*
1643+
* NB: this MUST happen before we fork a checkpoint or shutdown
1644+
* subprocess, else they will have wrong local ThisStartUpId.
1645+
*/
1646+
SetThisStartUpID();
1647+
16391648
FatalError= false;/* done with recovery */
1649+
1650+
/*
1651+
* Arrange for first checkpoint to occur after standard delay.
1652+
*/
1653+
CheckPointPID=0;
1654+
checkpointed=time(NULL);
1655+
1656+
/*
1657+
* Go to shutdown mode if a shutdown request was pending.
1658+
*/
16401659
if (Shutdown>NoShutdown)
16411660
{
16421661
if (ShutdownPID>0)
@@ -1648,17 +1667,6 @@ reaper(SIGNAL_ARGS)
16481667
ShutdownPID=ShutdownDataBase();
16491668
}
16501669

1651-
/*
1652-
* Startup succeeded - remember its ID and RedoRecPtr
1653-
*/
1654-
SetThisStartUpID();
1655-
1656-
/*
1657-
* Arrange for first checkpoint to occur after standard delay.
1658-
*/
1659-
CheckPointPID=0;
1660-
checkpointed=time(NULL);
1661-
16621670
gotoreaper_done;
16631671
}
16641672

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp