Package: postgresql-common
Version: 193
Severity: wishlist
Tags: patch

Hi,

PostgreSQL is a network server like ssh. At least it can be
used over the network, if configured to.

PG should be started after having the network configured,
so that it can for example listen on specific interfaces.
It should stop before the network goes down, so that it can
properly shutdown client connections (and tell clients,
that the COMMIT was successful, or not).

The init.d file has "Required-Start: ... $network" and
"Required-Stop: ... $network" also.

So the systemd unit should have "After=network.target" in
its [Unit] section.

"Severity: wishlist" - I don't have an actual issue
currently. I just noticed this while reviewing journalctl
for shutdown.


Cheers

    Elrond
--- systemd/[email protected]	2018-06-14 18:01:36.000000000 +0200
+++ systemd/[email protected]	2018-10-14 13:41:35.000000000 +0200
@@ -10,6 +10,7 @@
 PartOf=postgresql.service
 ReloadPropagatedFrom=postgresql.service
 Before=postgresql.service
+After=network.target
 
 [Service]
 Type=forking

Reply via email to