Recommended method to change important params in unit file is to write additional unit files... # For example, if you want to change the server's port number to 5433, # create a file named # "/etc/systemd/system/postgresql-10.service.d/port.conf" # containing: # [Service] # Environment=PGPORT=5433 # This will override the setting appearing below. Unit file should source standard config files for pg rather than have any parameter hardcoded in the unit file
I fail to see the problem here. As far as I'm aware, systemd provides no method to parse postgresql.conf, nor can a function be included in the service file a la /etc/init.d/postgresql-@SLOT@. So, /etc/systemd/system/postgresql-10.service.d/port.conf is the standard config file. I'm all for improving how dev-db/postgresql utilizes systemd, but I don't have the time to learn it. Patches are welcome, and do cite recommendations.