Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 667530 - dev-db/postgresql systemd unit file configuration overwritten with updates
Summary: dev-db/postgresql systemd unit file configuration overwritten with updates
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-02 06:23 UTC by Psyb3rN4ut
Modified: 2019-05-14 12:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.