postgresql/src/backend/postmaster
Michael Paquier 32f2792eb6 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
2018-08-29 17:11:40 -07:00
..
autovacuum.c Avoid holding AutovacuumScheduleLock while rechecking table statistics. 2018-03-13 12:28:38 -04:00
bgworker.c Don't run atexit callbacks in quickdie signal handlers. 2018-08-08 19:09:35 +03:00
bgwriter.c Don't run atexit callbacks in quickdie signal handlers. 2018-08-08 19:09:35 +03:00
checkpointer.c Don't run atexit callbacks in quickdie signal handlers. 2018-08-08 19:09:35 +03:00
fork_process.c Update copyright for 2015 2015-01-06 11:43:47 -05:00
Makefile Allow background workers to be started dynamically. 2013-07-16 13:02:15 -04:00
pgarch.c Avoid unlikely data-loss scenarios due to rename() without fsync. 2016-03-09 18:53:53 -08:00
pgstat.c Clean up assorted misuses of snprintf()'s result value. 2018-08-15 16:29:32 -04:00
postmaster.c Stop bgworkers during fast shutdown with postmaster in startup phase 2018-08-29 17:11:40 -07:00
startup.c Don't run atexit callbacks in quickdie signal handlers. 2018-08-08 19:09:35 +03:00
syslogger.c Make syslogger more robust against failures in opening CSV log files. 2018-08-26 14:21:55 -04:00
walwriter.c Don't run atexit callbacks in quickdie signal handlers. 2018-08-08 19:09:35 +03:00