[Pkg-postgresql-public] Bug#855762: add RequiresMountsFor to .service file

Helmut Grohne helmut at subdivi.de
Tue Feb 21 14:56:49 UTC 2017

Package: postgresql-common
Version: 165+deb8u2
Severity: wishlist

Please add

    RequiresMountsFor=/var/lib/postgresql/%I /etc/postgresql/%I

to the [Unit] section of postgresql at .service. On a normal system no part
of the above paths beyond / will be a mount point (possibly /var). The
line is redundant, because usually local-fs.target will ensure that
those paths will be mounted in time. If a user chooses to put the
database on a separate filesystem however, marking that filesystem
noauto can opt it out of local-fs.target and thus delay mounting. The
RequiresMountsFor would then cause it to be mounted anyway and use the
correct ordering. Moreover the system will continue booting when
mounting such a filesystem fails and degrade by not starting postgres
instead of dropping you into a rescue shell. In essence, this option is
not needed by normal setups, does not hurt anyone and helps with
non-standard mount points.


More information about the Pkg-postgresql-public mailing list