Comment 8 for bug 1772601

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Depends if the intention was to fork a custom daemon within the same
unit; or to manage the system configured postgresql cluster with the
system/package integration of clusters management with the custom ctl
command that calls systemctl.

No, there is no postgresql unit, there are only instance unit types
per version/cluster. And thus one should be invoking pg_ctlcluster in
a way that does trigger the systemd unit. If one is using
pg_ctlcluster, the intention is to use the system units infrastructure
and e.g. have these clusters start up and recover on reboots. I would
have expected a jujud unit to create its own pg cluster and have that
running as postgresql@X.Y-$unit.service instances.

I would advise against adding KillMode=process, as this will result in
opening up the avenue for left-over lingering processors. Which may
end up blocking shutdown for up to 30 mins. And e.g. systemctl
restarts not actually killing and restarting all the processes, as one
is currently experiencing.

pg_ctlcluster integration with systemctl is not at all common to all
daemons. This is very Debian's packaging of postgresql specific
integration with systemd on Debian & Ubuntu.

Where is the code for the charm in question?

--
Regards,

Dimitri.