]> granicus.if.org Git - postgresql/commit
Stop bgworkers during fast shutdown with postmaster in startup phase
authorMichael Paquier <michael@paquier.xyz>
Thu, 30 Aug 2018 00:11:40 +0000 (17:11 -0700)
committerMichael Paquier <michael@paquier.xyz>
Thu, 30 Aug 2018 00:11:40 +0000 (17:11 -0700)
commit32f2792eb6163ce7265b22dad4a20ddd1b81c5eb
treeb10d14b19e77ebb637a9eb0eb348e17bd987cd39
parentaac21f11df0dbe6ee32ac8151bd1ea2c7987f683
Stop bgworkers during fast shutdown with postmaster in startup phase

When a postmaster gets into its phase PM_STARTUP, it would start
background workers using BgWorkerStart_PostmasterStart mode immediately,
which would cause problems for a fast shutdown as the postmaster forgets
to send SIGTERM to already-started background workers.  With smart and
immediate shutdowns, this correctly happened, and fast shutdown is the
only mode missing the shot.

Author: Alexander Kukushkin
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/CAFh8B=mvnD8+DZUfzpi50DoaDfZRDfd7S=gwj5vU9GYn8UvHkA@mail.gmail.com
Backpatch-through: 9.5
src/backend/postmaster/postmaster.c