Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 667530

Summary: dev-db/postgresql systemd unit file configuration overwritten with updates
Product: Gentoo Linux Reporter: Psyb3rN4ut <psyb3rn4ut>
Component: Current packagesAssignee: PgSQL Bugs <pgsql-bugs>
Status: RESOLVED NEEDINFO    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Psyb3rN4ut 2018-10-02 06:23:57 UTC
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
Comment 1 Aaron W. Swenson gentoo-dev 2018-10-14 11:21:55 UTC
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.