Bug 735302 - environment variables from /etc/sysconfig does not affect startup script
Summary: environment variables from /etc/sysconfig does not affect startup script
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 16
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-09-02 09:04 UTC by arkhnchul
Modified: 2011-09-03 18:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-09-02 13:56:02 UTC

Attachments (Terms of Use)

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.

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