Bug 738154 - postgresql.service alters during software upgrade
Summary: postgresql.service alters during software upgrade
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 16
Hardware: i686
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-14 07:29 UTC by arkhnchul
Modified: 2011-09-14 16:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-14 08:24:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description arkhnchul 2011-09-14 07:29:23 UTC
Description of problem:
during upgrade of postgresql-server package the /lib/systemd/system/postgresql.service file, containing some configured environmental variables for postgres, became overwritten instead creating a .rpmnew file.

Version-Release number of selected component (if applicable):
postgresql-server-9.1.0-1.fc16.i686

How reproducible:

Steps to Reproduce:
1. change PGDATA in /lib/systemd/system/postgresql.service
2. upgrade postgresql-server package
  
Actual results:
/var/lib/pgsql/data as PGDATA in /lib/systemd/system/postgresql.service

Expected results:
having actual configured postgresql.service file and postgresql.service.rpmnew from upgraded package, like as another config files belonging to packages being upgraded.

Additional info:

Comment 1 Elad Alfassa 2011-09-14 07:49:15 UTC
In my opinion, this is not a bug.
If you want to customize the service file, you should do it in /etc/systemd/system and not it /lib/systemd/system.
just copy the service file to the /etc location, and change it however you want. systemd will use the service file from the /etc location.

Comment 2 Honza Horak 2011-09-14 08:09:36 UTC
(In reply to comment #1)
> If you want to customize the service file, you should do it in
> /etc/systemd/system and not it /lib/systemd/system.
> just copy the service file to the /etc location, and change it however you
> want. systemd will use the service file from the /etc location.

Yes, this is the right approach. More info about systemd:
http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions
http://0pointer.de/public/systemd-man/

Comment 3 arkhnchul 2011-09-14 08:24:21 UTC
hmm, thanks

Comment 4 Tom Lane 2011-09-14 14:50:03 UTC
(In reply to comment #1)
> In my opinion, this is not a bug.
> If you want to customize the service file, you should do it in
> /etc/systemd/system and not it /lib/systemd/system.
> just copy the service file to the /etc location, and change it however you
> want. systemd will use the service file from the /etc location.

Yes, that is the design the systemd folk have foisted on us.  IMO it's not a good design, because it fails to consider the likelihood that the packager will need to change the service file from time to time.  But it's not for the postgresql package to do things differently than the Fedora packaging guidelines say.  You might care to open up a bug against systemd pointing out that they need a better design for customized service files.

Comment 5 arkhnchul 2011-09-14 16:07:22 UTC
i think that old /etc/sysconfig/* way was much better than current systemd method... before now we should not have been edit /etc/init.d/ scripts, when needed to change some config or environment variable, huh.


Note You need to log in before you can comment on or make changes to this bug.