Task #5321

Make postgres a systemd daemon

Added by Ivan Lezhnjov 10/28/2016 (over 5 years) ago.

Status:NewStart date:10/28/2016
Priority:NormalDue date:
Assignee:-% Done:


Category:-Spent time:-
Target version:-


Running postgres process as a daemon via an automatically generated systemd service file, results in snap utility failing to install a snap package.

The reason for this is because the said snap utility attempts to start all daemons when it is installing a snap package. The package is always installed as root and thus any daemon is run as root too. However, PostgreSQL is not designed to run as root and it actually refuses to. Thus, if a daemon startup fails, installation of a snap package fails too.

Ideally, postgres should be a systemd-managed process but given the clash of design philosophies it currently doesn't work well.

We need to start a dialog with snapcraft developers and see if they can propose a solution to this problem that doesn't involve patching PostgreSQL.

Also available in: Atom PDF