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

Commit89f562a

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 parente2841d3 commit89f562a

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
@@ -2734,7 +2734,7 @@ pmdie(SIGNAL_ARGS)
27342734
signal_child(BgWriterPID,SIGTERM);
27352735
if (WalReceiverPID!=0)
27362736
signal_child(WalReceiverPID,SIGTERM);
2737-
if (pmState==PM_RECOVERY)
2737+
if (pmState==PM_STARTUP||pmState==PM_RECOVERY)
27382738
{
27392739
SignalSomeChildren(SIGTERM,BACKEND_TYPE_BGWORKER);
27402740

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp