Re: Moving the data directory for systemd service startup

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

 



Hi Evan,

On Mon, Jul 23, 2018 at 10:29:52AM -0700, Evan Rempel wrote:
> Except that the systemd file comes from the postgresql10-server RPM produced by the PostgreSQL community.

The origin of your unit file doesn't matter to systemd on your EL7 host. You
can run

 # systemctl edit <yourunitfilename>

and (recent releases of) systemd will drop you into your $EDITOR in an
appropriately created drop-in unit extension file, or you can run

 # mkdir /etc/systemd/system/<yourunitfilename>.service.d/
 # $EDITOR /etc/systemd/system/<yourunitfilename>.service.d/environment.conf

and put your "Environment=PGDATA=/var/lib/pgsql/9.6/data/" stanza (take care
to get the INI-style section right!) into the resulting editor buffer.

Once you save that and `systemctl daemon-reload` your unit configuration, you
can use

 # systemctl cat <yourunitfilename>

to see what systemd makes of your changes, and then restart the service with
the changes applied.

The delta you introduced that way will survive package upgrades (but you'll
have to re-apply these changes to postgres service units with new/different
unit names, i. e. different major versions, in the same manner).

-- 
with best regards:
- Johannes Truschnigg ( johannes@xxxxxxxxxxxxxxx )

www:   https://johannes.truschnigg.info/
phone: +43 650 2 133337
xmpp:  johannes@xxxxxxxxxxxxxxx

Please do not bother me with HTML-email or attachments. Thank you.

Attachment: signature.asc
Description: PGP signature


[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