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

Commita297d64

Browse files
Checkpointer starts before bgwriter to avoid missing fsync requests.
Noted while testing Hot Standby startup.
1 parent1ec6a2b commita297d64

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,10 +1378,10 @@ ServerLoop(void)
13781378
if (pmState==PM_RUN||pmState==PM_RECOVERY||
13791379
pmState==PM_HOT_STANDBY)
13801380
{
1381-
if (BgWriterPID==0)
1382-
BgWriterPID=StartBackgroundWriter();
13831381
if (CheckpointerPID==0)
13841382
CheckpointerPID=StartCheckpointer();
1383+
if (BgWriterPID==0)
1384+
BgWriterPID=StartBackgroundWriter();
13851385
}
13861386

13871387
/*
@@ -2372,10 +2372,10 @@ reaper(SIGNAL_ARGS)
23722372
* when we entered consistent recovery state. It doesn't matter
23732373
* if this fails, we'll just try again later.
23742374
*/
2375-
if (BgWriterPID==0)
2376-
BgWriterPID=StartBackgroundWriter();
23772375
if (CheckpointerPID==0)
23782376
CheckpointerPID=StartCheckpointer();
2377+
if (BgWriterPID==0)
2378+
BgWriterPID=StartBackgroundWriter();
23792379
if (WalWriterPID==0)
23802380
WalWriterPID=StartWalWriter();
23812381

@@ -4239,10 +4239,10 @@ sigusr1_handler(SIGNAL_ARGS)
42394239
* Crank up the background tasks. It doesn't matter if this fails,
42404240
* we'll just try again later.
42414241
*/
4242-
Assert(BgWriterPID==0);
4243-
BgWriterPID=StartBackgroundWriter();
42444242
Assert(CheckpointerPID==0);
42454243
CheckpointerPID=StartCheckpointer();
4244+
Assert(BgWriterPID==0);
4245+
BgWriterPID=StartBackgroundWriter();
42464246

42474247
pmState=PM_RECOVERY;
42484248
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp