Moving the data directory for systemd service startup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using the official RPMs for RHEL-7 and am having difficulty in using a different database directory than the
default of

/var/lib/pgsql/9.6/data/
or
/var/lib/pgsql/10/data/


It is easy to modify the service file

/usr/lib/systemd/system/postgresql-9.6.service

with the line

Environment=PGDATA=/var/lib/pgsql/9.6/data/

to point to the location I want, but an RPM update will replace this file and break database startup.

I was hoping that there would be a line

EnvironmentFile=-/etc/sysconfig/pgsql/postgresql-9.6

or

EnvironmentFile=-/etc/sysconfig/pgsql/postgresql-10

to allow for customization of the environment variables, similar to the init.d startup, but I don't see one.


Am I missing something, or is the configuration of the systemd unit file an oversight?

Any information would be helpful.

Evan.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux