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

Commit8d498a5

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 parent81568a9 commit8d498a5

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
@@ -1005,13 +1005,16 @@ WaitForBackgroundWorkerShutdown(BackgroundWorkerHandle *handle)
10051005

10061006
status=GetBackgroundWorkerPid(handle,&pid);
10071007
if (status==BGWH_STOPPED)
1008-
returnstatus;
1008+
break;
10091009

10101010
rc=WaitLatch(&MyProc->procLatch,
10111011
WL_LATCH_SET |WL_POSTMASTER_DEATH,0);
10121012

10131013
if (rc&WL_POSTMASTER_DEATH)
1014-
returnBGWH_POSTMASTER_DIED;
1014+
{
1015+
status=BGWH_POSTMASTER_DIED;
1016+
break;
1017+
}
10151018

10161019
ResetLatch(&MyProc->procLatch);
10171020
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp