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

Commit5ccceb2

Browse files
committed
Fix race condition in startup progress reporting.
Commit9ce346e added startupprogress reporting, but begin_startup_progress_phase has a racecondition: the timeout for the previous phase might fire justbefore we reschedule the interrupt for the next phase.To avoid the race, disable the timeout, clear the flag, and thenre-enable the timeout.Patch by me, reviewed by Nitin Jadhav.Discussion:https://postgr.es/m/CA+TgmoYq38i6iAzfRLVxA6Cm+wMCf4WM8wC3o_a+X_JvWC8bJg@mail.gmail.com
1 parent2f5c439 commit5ccceb2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎src/backend/postmaster/startup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ begin_startup_progress_phase(void)
320320
if (log_startup_progress_interval==0)
321321
return;
322322

323+
disable_timeout(STARTUP_PROGRESS_TIMEOUT, false);
324+
startup_progress_timer_expired= false;
323325
startup_progress_phase_start_time=GetCurrentTimestamp();
324326
fin_time=TimestampTzPlusMilliseconds(startup_progress_phase_start_time,
325327
log_startup_progress_interval);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp