postgresql: Fix shutdown

Postgres was taking a long time to shutdown.  This is because we were
sending SIGINT to all processes, apparently confusing the autovacuum
launcher.  Instead it should only be sent to the main process (which
takes care of shutting down the others).

The downside is that systemd will also send the final SIGKILL only to
the main process, so other processes in the cgroup may be left behind.
There should be an option for this...
This commit is contained in:
Eelco Dolstra 2013-12-03 11:35:57 -05:00
parent 04dd0bb5df
commit 7809134e29

View File

@ -211,6 +211,7 @@ in
# Shut down Postgres using SIGINT ("Fast Shutdown mode"). See
# http://www.postgresql.org/docs/current/static/server-shutdown.html
KillSignal = "SIGINT";
KillMode = "process"; # FIXME: this may cause processes to be left behind in the cgroup even after the final SIGKILL
# Give Postgres a decent amount of time to clean up after
# receiving systemd's SIGINT.