repmgr icon indicating copy to clipboard operation
repmgr copied to clipboard

Add "KillMode=process" to repmgrd systemd service file?

Open ibarwick opened this issue 7 years ago • 0 comments

Currently (on CentOS 7 at least) the repmgrd systemd service file (e.g. /usr/lib/systemd/system/repmgr96.service) doesn't contain a KillMode parameter. The default is control-group [1], which evidently has side-effects if e.g. the PostgreSQL instance has been stopped/started with pg_ctl; in this case systemd will kill the PostgreSQL instance if repmgrd is restarted, which is unfortunate, to say the least.

[1] https://www.freedesktop.org/software/systemd/man/systemd.kill.html

It therefore seems prudent to add KillMode=process, as repmgrd is a single process which should not have any dependency on the PostgreSQL process, however this should be carefully considered before implementing.

Note: this is not a panacea for issues stemming from mixing pg_ctl and systemctl calls on a systemd system.

ibarwick avatar Jan 22 '19 07:01 ibarwick