FS#69413 - Content of Postgresql systemd.service file is overwritten

Attached to Project: Arch Linux
Opened by Henning Ryll (fow0ryl) - Saturday, 23 January 2021, 10:14 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 23 January 2021, 11:07 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The file /usr/lib/systemd/system/postgresql.service is overwritten by any package update.
Because according to the arch wiki, you have to change PGROOT within this file, it's no good idea to overwrite the file without any interaction.
So postgresql stops working after any update :(

Additional info:
* package version(s) - all
* config and/or log files etc. - /usr/lib/systemd/system/postgresql.service
* link to upstream bug report, if any

Steps to reproduce:
just update postgresql
This task depends upon

Closed by  Doug Newgard (Scimmia)
Saturday, 23 January 2021, 11:07 GMT
Reason for closing:  Not a bug
Comment by Antonio Rojas (arojas) - Saturday, 23 January 2021, 10:29 GMT
Units in /usr/lib are not meant to be edited manually. If you need to do so, copy it to /etc and edit it there.
Comment by nl6720 (nl6720) - Saturday, 23 January 2021, 10:54 GMT
The wiki says "Edit postgresql.service to create a drop-in file", i.e. run systemctl edit postgresql.service. It doesn't say to edit /usr/lib/systemd/system/postgresql.service directly.
Comment by Henning Ryll (fow0ryl) - Saturday, 23 January 2021, 11:02 GMT
ok, sorry.
But the wiki https://wiki.archlinux.org/index.php/PostgreSQL#Change_default_data_directory is not clear at this point for users who never had anything to do with systemd
It would be even better to explicit add a comment like : "never edit /lib/systemd/system/postgresql.service"
Comment by nl6720 (nl6720) - Saturday, 23 January 2021, 11:06 GMT
I've slightly clarified the wiki instructions by explicitly using a drop-in snippet. There should not be any misunderstandings anymore.

Loading...