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

Commit35622f7

Browse files
committed
Stop bgworkers during fast shutdown with postmaster in startup phase
When a postmaster gets into its phase PM_STARTUP, it would startbackground workers using BgWorkerStart_PostmasterStart mode immediately,which would cause problems for a fast shutdown as the postmaster forgetsto send SIGTERM to already-started background workers. With smart andimmediate shutdowns, this correctly happened, and fast shutdown is theonly mode missing the shot.Author: Alexander KukushkinReviewed-by: Michael PaquierDiscussion:https://postgr.es/m/CAFh8B=mvnD8+DZUfzpi50DoaDfZRDfd7S=gwj5vU9GYn8UvHkA@mail.gmail.comBackpatch-through: 9.5
1 parent49841ed commit35622f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2685,7 +2685,7 @@ pmdie(SIGNAL_ARGS)
26852685
signal_child(BgWriterPID,SIGTERM);
26862686
if (WalReceiverPID!=0)
26872687
signal_child(WalReceiverPID,SIGTERM);
2688-
if (pmState==PM_RECOVERY)
2688+
if (pmState==PM_STARTUP||pmState==PM_RECOVERY)
26892689
{
26902690
SignalSomeChildren(SIGTERM,BACKEND_TYPE_BGWORKER);
26912691

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp