Hi All, I had my database fall over earlier, Initially I thought it was due to a change in the OS but the postgresql update overwrote my systemd service file. How can I create a file for my postgresql service that will not be overwritten when updates are applied? Am I correct in thinking it will be something like vi /etc/systemd/system/postgresql.service.d/postgresql-limit-stack.conf #with the contents: .include /etc/systemd/system/multi-user.target.wants/postgresql.service [Service] LimitSTACK=17825792 thanks Michael
On 02/17/2016 08:50 AM, Michael H wrote:> How can I create a file for my postgresql service that will not be > overwritten when updates are applied?Use "systemctl edit <unit>" to edit a drop-in snippet. This will create a file in /etc/systemd/system/<unit>.d/ that overrides settings in the unit file packaged in the rpm. You only need to specify the settings which you wish to override. See man pages for systemctl, systemd.unit, and systemd-delta for more information.
On 17 February 2016 at 16:50, Michael H <michael at wemoto.com> wrote:> Hi All, > > I had my database fall over earlier, Initially I thought it was due to a > change in the OS but the postgresql update overwrote my systemd service > file. > > How can I create a file for my postgresql service that will not be > overwritten when updates are applied? > > Am I correct in thinking it will be something like > > vi /etc/systemd/system/postgresql.service.d/postgresql-limit-stack.conf > #with the contents: > .include /etc/systemd/system/multi-user.target.wants/postgresql.service > [Service] > LimitSTACK=17825792 > >Note that when doing the .d override you must not do the .include ... the override already includes anythign else (hence override) and the override mechanism was intended to replace the .include stuff due to the fragility of that method.