]> granicus.if.org Git - postgresql/commit
Fix autovacuum launcher shutdown sequence
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 8 Apr 2015 16:19:49 +0000 (13:19 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 8 Apr 2015 16:19:49 +0000 (13:19 -0300)
commit37dc228e8d3de65895ef8b41c0c4a40b2983e32b
tree5ca51cacfa405f048240e218fe09ca4fda8d8116
parent6a560f5b5ff889ae252b9d8ee1f45b616fd6adbc
Fix autovacuum launcher shutdown sequence

It was previously possible to have the launcher re-execute its main loop
before shutting down if some other signal was received or an error
occurred after getting SIGTERM, as reported by Qingqing Zhou.

While investigating, Tom Lane further noticed that if autovacuum had
been disabled in the config file, it would misbehave by trying to start
a new worker instead of bailing out immediately -- it would consider
itself as invoked in emergency mode.

Fix both problems by checking the shutdown flag in a few more places.
These problems have existed since autovacuum was introduced, so
backpatch all the way back.
src/backend/postmaster/autovacuum.c