Bug 735302

Summary: environment variables from /etc/sysconfig does not affect startup script
Product: [Fedora] Fedora Reporter: arkhnchul <arkhnchul>
Component: postgresqlAssignee: Tom Lane <tgl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 16CC: devrim, hhorak, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-02 13:56:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description arkhnchul 2011-09-02 09:04:59 UTC
Description of problem:
changing environment variables like PGDATA in /etc/sysconfig/pgsql/postgresql does not affect to startng postgresql.service, unlike previous releases

Version-Release number of selected component (if applicable):
postgresql-server-9.0.4-8.fc16.i686 package

How reproducible:

Steps to Reproduce:
1. change PGDATA in the /etc/sysconfig/pgsql/postgresql
2. try to restart postgresql server via "systemctl restart postgresql.service"
  
Actual results:
postgres still using /var/lib/pgsql/data as PGDATA

Expected results:
start postgresql server with PGDATA variable from /etc/sysconfig/pgsql/postgresql

Additional info:
workaround: change PGDATA in /lib/systemd/system/postgresql.service

Comment 1 Tom Lane 2011-09-02 13:56:02 UTC
This is an intentional change: sysconfig files are deprecated in the systemd world, and you're supposed to apply any customization you need by making a custom file in /lib/systemd/system.  (Yeah, I have doubts about the future-proofness of that policy too, but it's the policy.)

Comment 2 arkhnchul 2011-09-03 14:50:45 UTC
ok, thanks for explanation...

Comment 3 Tom Lane 2011-09-03 18:28:04 UTC
I've modified the Fedora 16 release notes to document this explicitly.