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

Commitc1d6ee8

Browse files
committed
Fix bogus coding in WaitForBackgroundWorkerShutdown().
Some conditions resulted in "return" directly out of a PG_TRY block,which left the exception stack dangling, and to add insult to injuryfailed to restore the state of set_latch_on_sigusr1.This is a bug only in 9.5; in HEAD it was accidentally fixed by commitdb0f6ca, which removed the surrounding PG_TRY block. However, I (tgl)chose to apply the patch to HEAD as well, because the old coding wasgratuitously different from WaitForBackgroundWorkerStartup(), and therewould indeed have been no bug if it were done like that to start with.Dmitry IvanovDiscussion: <1637882.WfYN5gPf1A@abook>
1 parent4c27511 commitc1d6ee8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/backend/postmaster/bgworker.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,13 +1025,16 @@ WaitForBackgroundWorkerShutdown(BackgroundWorkerHandle *handle)
10251025

10261026
status=GetBackgroundWorkerPid(handle,&pid);
10271027
if (status==BGWH_STOPPED)
1028-
returnstatus;
1028+
break;
10291029

10301030
rc=WaitLatch(&MyProc->procLatch,
10311031
WL_LATCH_SET |WL_POSTMASTER_DEATH,0);
10321032

10331033
if (rc&WL_POSTMASTER_DEATH)
1034-
returnBGWH_POSTMASTER_DIED;
1034+
{
1035+
status=BGWH_POSTMASTER_DIED;
1036+
break;
1037+
}
10351038

10361039
ResetLatch(&MyProc->procLatch);
10371040
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp